Skip to content

Commit 4f649ea

Browse files
committed
fix(common): expose full gql request api
ensures that constants and decorators from graphql-request library are exposed to consumers fix #122
1 parent a92c6c8 commit 4f649ea

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

packages/graphql-request/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"access": "public"
3939
},
4040
"dependencies": {
41+
"@golevelup/nestjs-common": "^1.4.0",
4142
"@golevelup/nestjs-discovery": "^2.3.0",
4243
"@golevelup/nestjs-modules": "^0.4.0",
4344
"graphql-request": "^1.8.2"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { makeInjectableDecorator } from '@golevelup/nestjs-common';
2+
import {
3+
GraphQLClientConfigInject,
4+
GraphQLClientInject,
5+
} from './graphql-request.constants';
6+
7+
/**
8+
* Injects the GraphQL client configuration from this module into a service/controller
9+
*/
10+
export const InjectGraphQLConfig = makeInjectableDecorator(
11+
GraphQLClientConfigInject
12+
);
13+
14+
/**
15+
* Injects the GraphQL client provided by this module into a service/controller
16+
*/
17+
export const InjectGraphQLClient = makeInjectableDecorator(GraphQLClientInject);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
export * from './graphql-request.constants';
2+
export * from './graphql-request.decorators';
13
export * from './graphql-request.module';

0 commit comments

Comments
 (0)