-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
Description
I have an app that parses schemas and is processing them.
I want to use a directive in these schemas, but not to write there it's definition (alike Prisma directives in datamodel). But I can't run import these schemas:
Error: Directive relation: Couldn't find type relation in any of the schemas.
at collectDirective (.../node_modules/graphql-import/src/definition.ts:172:15)
at Array.forEach (<anonymous>)
at collectNode (.../node_modules/graphql-import/src/definition.ts:161:21)
at .../node_modules/graphql-import/src/definition.ts:135:7
at Array.forEach (<anonymous>)
graphql-import only works if I supply path to schema, not the schema content, so I can't simply concat directive definition during import.
So is there a way to overcome this? To add definitions during import? Or make it simply to ignore absence of relation