graphql-link icon indicating copy to clipboard operation
graphql-link copied to clipboard

GW fails for non custom schema

Open wtrocki opened this issue 5 years ago • 7 comments

listen: localhost:8080
upstreams:
  note:
    type: graphql
    url: http://127.0.0.1:4000/graphql
types:
  - name: Query
    actions:
    - type: mount
      upstream: note
      query: query {}

This happens with the latest release and master.

[wtrocki@graphapi gw ]$ /Users/wtrocki/Downloads/graphql-gw_0.2.0_mac_64bit-x86/graphql-gw serve 2020/10/13 12:38:30 downloading schema for upstream note: http://127.0.0.1:4000/graphql panic: runtime error: invalid memory address or nil pointer dereference

wtrocki avatar Oct 13 '20 11:10 wtrocki

So I have done some investigations and it looks like GW is not working with latest changes to graphql spec.

directive @cacheControl(maxAge:Int, scope:CacheControlScope) on 
"Exposes a URL that specifies the behaviour of this scalar."
directive @specifiedBy(  
  "The URL that specifies the behaviour of this scalar."
  url:String!
) on

that are included into the schema crashing gw.

wtrocki avatar Oct 13 '20 11:10 wtrocki

Workaround is to get schema locally. Remove directives and use --production mode. Amazing features @chirino. Really like how we can merge multiple serverless functions into single schema

wtrocki avatar Oct 13 '20 12:10 wtrocki

Could you post the schemas that are giving you issues?

chirino avatar Oct 13 '20 15:10 chirino

https://github.com/aerogear/OpenVolunteerPlatform/blob/debezium/integration/graphql-gw/upstreams/gateway.graphql

  • we removed the parts mentioned above and all works so no worries. I might look into this issue in free time to see if we can ignore directives.

wtrocki avatar Oct 13 '20 16:10 wtrocki

Hey, I'd like to work on this issue. What would be a good starting point for the same?

namit-chandwani avatar Mar 11 '21 07:03 namit-chandwani

This actually requires updating graphql library we use to official one. #41

wtrocki avatar Mar 11 '21 08:03 wtrocki

Okay. In that case, can I start working on issue #41 now?

namit-chandwani avatar Mar 11 '21 10:03 namit-chandwani