easygraphql / easygraphql-parser Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The following schema fails to parse:
interface Node {
id: ID!
}
interface Object {
name: String!
id: ID!
}
type ActualThing implements Object, Node {
name: String!
id: ID!
property: Int!
}
Error:
Syntax Error: Unexpected Name "Node"
GraphQL request (10:37)
9:
10: type ActualThing implements Object, Node {
^
11: name: String!
at syntaxError (node_modules/graphql/error/syntaxError.js:24:10)
at unexpected (node_modules/graphql/language/parser.js:1491:33)
at parseDefinition (node_modules/graphql/language/parser.js:155:9)
at many (node_modules/graphql/language/parser.js:1524:16)
at parseDocument (node_modules/graphql/language/parser.js:115:18)
at parse (node_modules/graphql/language/parser.js:50:10)
at schemaParser (node_modules/easygraphql-parser/lib/schemaParser.js:208:24)
It would extremely useful to have another field that specifies what types implement a specific interface. You could use the types
field that's currently just used for unions, or you could add a separate field. Currently there's no way to ascertain the link between a concrete and an abstract type from the generated data structure.
Employee: {
type: 'InterfaceTypeDefinition',
description: undefined,
fields: [ [Object], [Object], [Object] ],
values: [],
types: [],
implementedTypes: [ 'SecurityGuard', 'Secretary' ]
},
1.5.8
to 1.6.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
merge-graphql-schemas is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
graphql
is listed within the peerDependencies
but also in the dependencies
:
"dependencies": {
"graphql": "^14.4.0",
"merge-graphql-schemas": "^1.5.8"
},
"peerDependencies": {
"graphql": "^0.13.0 || ^14.0.0"
},
It makes the GraphQLSchema
instance check fail since my schema was built with my graphql
dependency and the check is made against another instance of GraphQLSchema
, namely, the nested graphql
dependency.
Removing the node_modules/easygraphql-parser/node_modules
directory makes it work.
Would it be possible to move the "graphql": "^14.4.0",
to devDependencies
in this package? It would still work for development, and would avoid any collision in the wild.
merge-graphql-schemas has been merged into graphql-tools v6
Remember #9?
I just ran into a situation where it'd be extremely useful to have this type of double direction link for Union types and the member types part of that union.
What do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.