nicolasdao / graphql-s2s

Add GraphQL Schema support for type inheritance, generic typing, metadata decoration. Transpile the enriched GraphQL string schema into the standard string schema understood by graphql.js and the Apollo server client.
Other
187 stars 15 forks source link

Support GraphQL draft syntax for multiple interface implementation. #28

Open purplemana opened 5 years ago

purplemana commented 5 years ago

Per the spec, the multiple interface implementation syntax uses & instead of , as the separator, e.g.

type User implements Node & Paginated {

Currently graphql-s2s converts this to:

type User implements Node {

keeping only the first interface name.

An online repl is available here.

In addition to this, imho, the inherits syntax which is graphql-s2s specific, should also be changed to use & as name separator keeping both the syntax in harmony.

nicolasdao commented 5 years ago

Makes a lot of sense @purplemana. I agree with you.

I've added that to my list. I'll release that change with the next version of graphql-s2s.

Really appreciate you took the time to suggest that.

greemo commented 2 years ago

Great, +1, the comma use for multiple implementation on the output schema breaks my automation flow, as I must manually convert the commas to &s.