Skip to content

Commit

Permalink
chore: 🔧 (api/graphql) valiable values を apollo studio に report するように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
dino3616 committed Jan 28, 2024
1 parent b884095 commit e6c320a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/api/src/config/graphql/graphql-config.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { join } from 'path';
import { ApolloServerPluginLandingPageLocalDefault } from '@apollo/server/plugin/landingPage/default';
import { ApolloServerPluginUsageReporting } from '@apollo/server/plugin/usageReporting';
import { ApolloDriver, type ApolloDriverConfig } from '@nestjs/apollo';
import { GraphQLModule } from '@nestjs/graphql';
import { createComplexityLimitRule } from 'graphql-validation-complexity';
Expand All @@ -26,6 +27,15 @@ const createDevelopmentConfig = (): ApolloDriverConfig => baseConfig;
const createProductionConfig = (envService: EnvService): ApolloDriverConfig => ({
...baseConfig,
apollo: envService.ApolloStudioConfig,
plugins: baseConfig.plugins && [
...baseConfig.plugins,
ApolloServerPluginUsageReporting({
sendVariableValues: {
all: true,
},
sendUnexecutableOperationDocuments: true,
}),
],
});

const createTestConfig = (): ApolloDriverConfig => baseConfig;
Expand Down

0 comments on commit e6c320a

Please sign in to comment.