1.1.4 • Published 5 months ago

@nbn23/graphql-directives v1.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

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

5 months ago

1.1.3

5 months ago

1.1.2

5 months ago

1.1.1

5 months ago

1.1.0

5 months ago

1.0.0

2 years ago

1.0.0-beta.2

2 years ago

1.0.0-beta.1

2 years ago

1.0.0-beta.0

2 years ago