Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

GW fails for non custom schema #38

Open
wtrocki opened this issue Oct 13, 2020 · 7 comments
Open

GW fails for non custom schema #38

wtrocki opened this issue Oct 13, 2020 · 7 comments
Labels

Comments

@wtrocki
Copy link
Contributor

wtrocki commented Oct 13, 2020

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
Copy link
Contributor Author

wtrocki commented Oct 13, 2020

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
Copy link
Contributor Author

wtrocki commented Oct 13, 2020

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

@chirino
Copy link
Collaborator

chirino commented Oct 13, 2020

Could you post the schemas that are giving you issues?

@wtrocki
Copy link
Contributor Author

wtrocki commented Oct 13, 2020

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 wtrocki added the gsoc label Feb 13, 2021
@namit-chandwani
Copy link
Member

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

@wtrocki
Copy link
Contributor Author

wtrocki commented Mar 11, 2021

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

@namit-chandwani
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants