Closed MartinLorensen closed 8 years ago
Hi!
I have one other report of this behavior. What backend are you using? We are using OpenTripPlanner in our project, where we implemented this ourselves using graphl-java , so maybe it's not exactly same with everything else. I'll look into it.
-Markku
We are using a fork of GraphQL-dotnet. And since the build-in introspection query doesn't support authentication, I am using a self-brewed command-line tool to actually dump the query output. However, it does look the same when using GraphiQL using your resource-intrespection-query.
Looking at graphql.org, it does look like any query (which introspection query is just a special case of) would return a dictionary with a single "data" key.
After a quick look I dump the result after stripping away the "data" key. So maybe I should dump with the data key and strip it after loading from the file.
Ok, I changed so that the file contains now the "data" key as well. Should make it easier to provide your own file. This is in version 0.3.0.
You can also check this with the 0.4.0 that I just released.
Forgot to say this solved our problem! Thanks!
Hi,
It seems the introspection query returns a "data" element contaning the "schema", where as the load-schema function expect the schema to be the outer most key.
The workaround is to just strip the "data" dictionary by hand (or a simple script).
{ "data": { "__schema": { ... } } }