misc gql types

This commit is contained in:
Elliot DeNolf
2020-12-12 22:50:43 -05:00
parent 8fd430819b
commit a95aada35a
2 changed files with 6 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
/* eslint-disable no-param-reassign */
function findOne(globalConfig) {
import { GlobalConfig } from '../../config/types';
import { Document } from '../../../types';
function findOne(globalConfig: GlobalConfig): Document {
async function resolver(_, args, context) {
if (args.locale) context.req.locale = args.locale;
if (args.fallbackLocale) context.req.fallbackLocale = args.fallbackLocale;

View File

@@ -5,6 +5,8 @@ function initPlayground(ctx: Payload): void {
if ((!ctx.config.graphQL.disablePlaygroundInProduction && process.env.NODE_ENV === 'production') || process.env.NODE_ENV !== 'production') {
ctx.router.get(ctx.config.routes.graphQLPlayground, graphQLPlayground({
endpoint: `${ctx.config.routes.api}${ctx.config.routes.graphQL}`,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore ISettings interface has all properties required for some reason
settings: {
'request.credentials': 'include',
},