1.1.4 • Published 2 years ago
@nbn23/graphql-directives v1.1.4
graphql-directives
This is a series of tools to be able to create and bind custom directives in our GraphQL schemas. This utility has support to Apollo Federation schemas.
Getting Started
Install 'graphql-directives' using npm.
npm install --save @nbn23/graphql-directives
Note: 'graphql-directives' assumes a TypeScript environment
Usage
import { DirectiveManager, BatchingDirective } from "@nbn23/graphql-directives";
const batchingDirective = new BatchingDirective();
const directiveManager = new DirectiveManager(batchingDirective);
const subgraphSchema = buildSubgraphSchema([
{
typeDefs: directiveManager.mergeTypeDefs(typeDefs),
resolvers
}
]);
const schema = directiveManager.mapSchema(subgraphSchema);
const server = new ApolloServer({
schema,
.
.
.
});
1.1.4
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.0
3 years ago
1.0.0-beta.2
3 years ago
1.0.0-beta.1
3 years ago
1.0.0-beta.0
3 years ago