Comments (15)
And another problem when parsing the GitHub schema:
Bad state: No element
dart:isolate _RawReceivePortImpl._handleMessage
Not a significant stacktrace, though :(
from gql.
@comigor, it should be type Area implements Node & Entity
https://spec.graphql.org/June2018/#sec-Objects
from gql.
@comigor, I was able to parse the official github schema just fine. Would you be able to narrow your SDL to the part which actually fails?
from gql.
It's line 813.
https://gist.github.com/comigor/5be2f6172e70aa118d99f86f272022a8#file-github-schema-graphql-L810-L814
from gql.
Oh, you're absolutely right about the spec, though some tools that convert Introspection queries to SDL seem to generate the SDL with commas.
Do you know if the spec was different before 2018? If it used a comma before, shouldn't we be retro-compatible and parse it as well?
Reference of code used in the conversion: https://gist.github.com/stubailo/041999ba5b8b15cede60b93ff9a38f53#file-introspection-result-to-sdl-js
from gql.
The GitHub SDL I'm using was also converted from Introspection query, so I think it may be the same (or a similar) problem.
from gql.
A quick search over older versions of the spec (https://spec.graphql.org/) does not reveal any useful info about commas as separators for interfaces.
Comma is actually an ignored token in GraphQL. https://spec.graphql.org/June2018/#sec-Appendix-Grammar-Summary.Ignored-Tokens
It's weird because the snippet you gave uses the reference implementation which uses &
as a separator. https://github.com/graphql/graphql-js/blob/af480089b5fcaa961adb356ef1dca13cf475e75f/src/utilities/printSchema.js#L192
from gql.
Wow that's weird! Apparently I've used a legacy version of this library (of 2 years ago): https://github.com/graphql/graphql-js/blame/652c0323ea2265fd1d001a9ee36fe9232369b75f/src/utilities/schemaPrinter.js#L179
from gql.
So probably GitHub wasn't working due to another spec difference.
from gql.
Yes, the GitHub example had a multi-line comment badly printed, probably.
from gql.
Actually, I'm still not able to parse the GitHub schema from the official source: https://github.com/octokit/graphql-schema
from gql.
That's interesting. You may notice I added a github example borrowed from package:graphql to this repo. It uses the same schema file you are pointing to (the*.graphql one; not *.json transformed).
I had some issues at the build layer, but the parser itself worked just fine without adjustment.
from gql.
I'm now trying to parse the official SDL schema (without conversion) from octokit repos without success.
from gql.
What version of package:gql
are you using?
What's the error message and/or stacktrace you get?
from gql.
Artemis is now parsing AST schemas directly (and the examples have proper conversions)
from gql.
Related Issues (20)
- `Visitor` and all sub class could have a `const` constructor to always subclasses to be const
- [gql_websocket_link] TransportWebSocketLink does not reconnect when graphql server disappears HOT 6
- [graphql_transport_ws] The new subprotocol doesn't auto-reconnect HOT 2
- OperationException(linkException: ResponseFormatException(originalException: type 'Null' is not a subtype of type 'String' in type cast HOT 1
- [Begging for support] Can the url be transformed? HOT 2
- [Support request] How can the client complete a subscription HOT 1
- [gql_websocket_link] Crash events on host lookup HOT 3
- LinkException as a sealed class HOT 2
- [WebSocketLink] inactivityTimeout causes a reconnect HOT 5
- More maintainers wanted
- gql_code_builder: allow adding custom builder factories for nested collections
- [gql_websocket_link] uuid package version conflict HOT 1
- [Question] Dio interceptor with retry not triggered when timeout() is invoked HOT 5
- dependencies issue HOT 1
- FR: Dynamic header HOT 1
- Issue with - distinguishing between null and absent values HOT 3
- How to make reconnect TransportWebSocketLink(TransportWsClientOptions())
- [BUG] Printer fails with string blocks HOT 5
- Type exception in gql_websocket_link with decoding incoming messages. HOT 1
- extract serializers from gql_code_builder to another package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gql.