graphql-rust/graphql-parser

Support for interface implementing another interface doesn't seem to work.

ehiggs opened this issue · 1 comments

#49 implemented interfaces that implement other interfaces for #44. However, when I try to use this in the wild, it doesn't seem to work.

Example:

This doesn't seem to work in the wild.

e.g.

query.graphl:

query FooList(bazId: ID!) {
  baz
}

schema.graphql:

interface Foo {
  foo: Int
}

interface Bar implements Foo {
  bar: Int
}

type Baz implements Bar {
  baz: ID!
}
$ graphql-client generate query.graphql --schema-path schema.graphql 
Error: Error generating module code: Parser error: schema parse error: Parse error at 5:15
Unexpected `implements[Name]`
Expected `end of input`


Location: /home/ehiggs/.cargo/registry/src/github.com-1ecc6299db9ec823/graphql_client_cli-0.10.0/src/generate.rs:75:24

I've run into this in the wild when dealing with Atlassian's (experimental) Jira Graphql schema derived using python's gql:

gql-cli https://jdog.atlassian.net/gateway/api/graphql --print-schema

It seems I didn't check the main branch correctly and 0.10.0 was released before the functionality was merged. When is g-c 0.11.0 due? Thanks!