dcalacci/gigbox

Generate graphql types automatically from graphene

dcalacci opened this issue · 1 comments

We are hand-rolling types to have consistency between our graphql API in the flask backend and our frontend.

Options:

graphql-code-generator

Assignees: @dcalacci
Labels: enhancement

!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of the editor. The first line will be the issue title. Assignees and Labels follow after a blank line. Leave an empty line before beginning the body of the issue. -->

The general flow I see includes generating a schema file and then using that to do some code generation with typescript. I think for now we don't need this, but if our APIs become more complex it will be very handy.

Graphene does not create a schema file by default, so it's unclear how to generate types for the frontend from our graphene schema. Maybe we can expose an endpoint that shares the graphene-generated schema?