chore: Use available apps enum type in queries and mutations

This commit is contained in:
Faruk AYDIN
2021-11-27 13:39:51 +01:00
committed by Ömer Faruk Aydın
parent 63d478f9a9
commit 9ea5242d94
3 changed files with 8 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
import { GraphQLString, GraphQLNonNull, GraphQLEnumType } from 'graphql';
import { GraphQLNonNull } from 'graphql';
import Connection from '../../models/connection';
import App from '../../models/app';
import connectionType from '../types/connection';
@@ -28,7 +28,7 @@ const createConnectionResolver = async (params: Params, req: RequestWithCurrentU
const createConnection = {
type: connectionType,
args: {
key: { type: availableAppsEnumType },
key: { type: GraphQLNonNull(availableAppsEnumType) },
data: { type: GraphQLNonNull(GraphQLJSONObject) }
},
resolve: (_: any, params: Params, req: RequestWithCurrentUser) => createConnectionResolver(params, req)