graphql-constraint-directive
graphql-constraint-directive copied to clipboard
Getting "Couldn't find type constraint in any of the schemas." error
I use graphql-tools to load up multiple files into one schema. Maybe i should set it up diffrently? Pls help :)
const loadSchema = loadSchemaSync(join(__dirname, "./graphql/*.graphql"), {
loaders: [new GraphQLFileLoader()],
});
let schema = makeExecutableSchema({
typeDefs: [constraintDirectiveTypeDefs, loadSchema],
});
schema = constraintDirective()(schema);
app.register(mercurius, {
schema: schema,
resolvers,
loaders,
context: buildContext,
graphiql: true,
});