chore: Introduce GraphQLJSONObject type for credentials

This commit is contained in:
Faruk AYDIN
2021-10-24 16:51:29 +02:00
committed by Ali BARIN
parent c7d757a337
commit 2eeeeb0028
8 changed files with 12 additions and 29 deletions

View File

@@ -2,8 +2,8 @@ import { GraphQLString, GraphQLNonNull } from 'graphql';
import Connection from '../../models/connection';
import App from '../../models/app';
import connectionType from '../types/connection';
import twitterCredentialInputType from '../types/twitter-credential-input';
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
import { GraphQLJSONObject } from 'graphql-type-json';
type Params = {
key: string,
@@ -27,7 +27,7 @@ const createConnection = {
type: connectionType,
args: {
key: { type: GraphQLNonNull(GraphQLString) },
data: { type: GraphQLNonNull(twitterCredentialInputType) }
data: { type: GraphQLNonNull(GraphQLJSONObject) }
},
resolve: (_: any, params: Params, req: RequestWithCurrentUser) => createConnectionResolver(params, req)
};