Giter Club home page Giter Club logo

easygraphql-parser's Issues

Syntax error when parsing schemas with types that implement multiple interfaces

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)

Link interfaces to their concrete implementations

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' ]
},

An in-range update of merge-graphql-schemas is breaking the build 🚨

The dependency merge-graphql-schemas was updated from 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.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

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 dependency collides with our own version

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.

Link unions to the composing types

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.