5.0.1 • Published 11 months ago

@ogma/platform-graphql v5.0.1

Weekly downloads
228
License
MIT
Repository
github
Last release
11 months ago

@ogma/platform-graphql

The GraphQLParser parser for the OgmaInterceptor. This plugin class parses GraphQL request and response object to be able to successfully log the data about the request. For more information, check out the @ogma/nestjs-module documentation.

Installation

Nothing special, standard npm i @ogma/platform-graphql or yarn add @ogma/platform-graphql

Usage

This plugin is to be used in the OgmaInterceptorOptions portion of the OgmaModule during forRoot or forRootAsync registration. It can be used like so:

@Module(
  OgmaModule.forRoot({
    interceptor: {
      gql: GraphQLParser
    }
  })
)
export class AppModule {}

Note: Due to the nature of subscriptions and the data available from the base ones, it is not possible at this time to log what subscriptions are made in the Ogma fashion.

Because the interceptor needs access to the request and response objects, when configuring the GraphqlModule from Nest, you need to add the req and res to the GraphQL context. to do this, while configuring the GraphqlModule, set the context property as such:

GraphqlModule.forRoot({
  context: ({ req, res }) => ({ req, res })
});
5.0.1

11 months ago

5.0.0

11 months ago

4.0.2

1 year ago

4.0.1

2 years ago

3.1.0

2 years ago

4.0.0

2 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago

0.4.4

3 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago