Skip to main content

Strawberry-based GraphQL API Server for AiiDA

Project description


Build Status codecov PyPI

Strawberry-based GraphQL Server for AiiDA

Why GraphQL when there is already the REST API? See ... a lot of possible optimizations and fits the graph-based structure of the AiiDA DB a lot better than a REST API.


For development:

Why Strawberry for GraphQL? It uses graphql-core v3 (while graphene is still stuck with v2), uses typings and dataclasses for both validation and schema generation. And it uses modern Python to write the schema, in comparison to the schema-first approach.

Why Python 3.7+? It's the future, and for Strawberry. In fact, were it not for a bug in uvloop this would be Python 3.8+ (for the walrus operator). And given the timeline these projects are running for, we'll probably see Python 3.9 until people effectively start using it.

Why Poetry? I wanted to get away from setuptools and used Poetry already in a different project and liked the virtualenv integration.



Installing the dependencies:

git clone
cd aiida-graphql

# for poetry installation use the official documentation
poetry install

To run the development server:

$ poetry run strawberry server aiida_graphql.schema

then visit http://localhost:8000/graphql with your browser.

Example query:

  computers {

Query Screenshot

Available fields

Documentation and schema are embedded in the development server.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiida-graphql-0.0.2.tar.gz (5.7 kB view hashes)

Uploaded source

Built Distribution

aiida_graphql-0.0.2-py3-none-any.whl (6.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page