Skip to content

libNeuroML and GraphQL and generateDS.py #175

@dkuhlman

Description

@dkuhlman

This an announcement of a feature, as opposed to a request for one.

I have added generateDS.py the ability to generate Python modules that implement a Strawberry GraphQL server.
So, you can generate the implementation of a GraphQL API from the NeuroML XML schema.
I'm guessing that there are problems hidden in it, but my testing so far shows that it works.
I used it to generate a module from NeuroML_v2.2.xsd
and now I can make GraphQL queries into the XML instance docs in the repo examples directory.

Here is what it did to test it:

(1) Generate the module:

#!/usr/bin/bash -x
./generateDS.py \
    -f \
    -o tmp01.py \
    --graphql="neuroml:NeuroMLDocument" \
    ../Git/NeuroML2/Schemas/NeuroML2/NeuroML_v2.2.xsd

(2) Run the Strawberry server:

#!/usr/bin/bash -x
GRAPHQL_ARGS=examples/NML2_FullCell.nml strawberry server tmp01

See the following for more info:

If you have comments, please pass them along.

Dave

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions