Skip to main content

cubicweb-graphql provides a GraphQL interface and querier for CubicWeb.

Basic use in Python

Once the CubicWeb instance has been launched, GraphQL queries can be executed using:

from cubicweb_graphql.querier import GraphQLQuerier

query = "query getAffaire($affaire_eid: ID) { Affaire(eid: $affaire_eid) { sujet } }"
result = GraphQLQuerier.execute(connection, query, affaire_eid=self.affaire1)

Access from the Web API

The GraphQL querier can be access through the Web API:

curl "http://localhost:8080/ajax" \
        -d "fname=graphql" \
        -d "query=$QUERY" \

.

Testing

Tests can be run using:

python -m unittest discover -s test

from top-level directory.

Release files for cubicweb-graphql 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cubicweb-graphql 0.2.2
File Size Uploaded
cubicweb-graphql-0.2.2.tar.gz 21.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cubicweb-graphql 0.2.2
File Interpreter ABI Platform
cubicweb_graphql-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 39.1 kB

Release files / cubicweb-graphql-0.2.2.tar.gz

Download URL cubicweb-graphql-0.2.2.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
52defff9becf79a570170429b5034aaa2a71b23f5b0112ed2fe19337f2d92be6
BLAKE2b-256 checksum
How to use checksums
be8bd54aab684b506c8398048118460ad6d4157eec7a19e79b5e48ff1715ffe8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release files / cubicweb_graphql-0.2.2-py3-none-any.whl

Download URL cubicweb_graphql-0.2.2-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
641b4d1098e695849e321987a30cf08ccb70ded8e3ec9daf40505ec95c0d6517
BLAKE2b-256 checksum
How to use checksums
f1505e98347c47089cc68a1ee45b2b7d74d3fb24e3b7fbae032bb82b88145dd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page