nicolasdao / schemaglue

Naturally breaks down your monolithic graphql schema into bits and pieces and then glue them back together.
BSD 3-Clause "New" or "Revised" License
116 stars 13 forks source link

Support for custom schema directives? #16

Closed MacMcIrish closed 5 years ago

MacMcIrish commented 5 years ago

https://facebook.github.io/graphql/draft/#sec-Type-System.Directives

Is this possible with the current system? I can add the types in the schema.graphql just fine, but is it possible to add the logic into the resolver as well?

nicolasdao commented 5 years ago

Not sure I fully understand your question @MacMcIrish. Directives are supported. The only things that schemaglue does, is merging files together. It does not affect the graphql syntax. If my answer is not satisfying, can you please provide a code example (try to use https://repl.it/ as I'll easily be able to see what you're trying to achieve).

MacMcIrish commented 5 years ago

Oh, sorry @nicolasdao , I was looking at a combination of the graphql spec and Apollo's custom directive support. I misunderstood the implementation, this is outside the hands of schemaglue. Thanks anyway! I'll close this.

nicolasdao commented 5 years ago

No problem @MacMcIrish .

Just in case, I'm also maintaining a cool little project called graphql-s2s (https://github.com/nicolasdao/graphql-s2s). It works well in combination with schemaglue. It adds support for type inheritance, generic types and metadata. Those features that are outside of the graphql convention are transpiled back to a standard schema (hence the name s2s, schema-2-schema).

Have a lovely day.

Cheers,

Nic