suessflorian / gqlfetch

Generates a graphql server schema using introspection.
MIT License
16 stars 12 forks source link

Interface arguments are not generated #6

Closed oatovar closed 1 year ago

oatovar commented 1 year ago

Description

If an interface field has arguments, they will not be generated. This causes errors when using the exported schema in genqlient.

Steps to reproduce

  1. Create a new go project
    $ mkdir sample-gengqlient-project
    $ cd sample-genqlient-project
    $ go mod init sample-genqlient-project
  2. Run go install github.com/suessflorian/gqlfetch/gqlfetch@latest
  3. Run gqlfetch --endpoint https://gitlab.com/api/graphql > schema.graphql
  4. Run go run github.com/Khan/genqlient@latest --init and observe that the it is unable to init the project because of the interface and implementation argument mismatch.
oatovar commented 1 year ago

I have a fix for this and will open up a PR for this shortly.

suessflorian commented 1 year ago

PR submitted was excellent, thanks @oatovar 🙏