Open pambrose opened 1 year ago
Can I please get someone from Instructure to respond to this?
Kia ora @pambrose - if this is helpful, the GraphQL Schema file seems to have been removed at some point in favour of generating it at build time. My way of interfacing with Canvas's GraphQL API is through GraphQL Code Generator, which can automatically add type hinting and validation to your code.
For exploring the schema, I use the GraphiQL interface (append "/graphiql" to your canvas domain). I believe this uses introspection queries in the same was as the code generator and works great.
Hope this helps!
The answer to my questions is:
1) clone the canvas repo
2) install all the required ruby stuff on your machine
3) run the command bundle exec rails graphql:schema
That generates a schema.graphql file.
I do not know why Instructure makes this so difficult. When querying for the schema, this is what the answer should look like: https://docs.github.com/en/graphql/overview/public-schema
Summary:
Please add a schema.graphql file to the repo—or at least point people toward how to create it. It seems odd to make a graphql endpoint available and not have any mention of its schema.
I tried to get it by using introspection on the Canvas graphql endpoint, but the results were incomplete.
Thanks, Paul