chore: Use integer for IDs of resources
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
a58411ee99
commit
3f2f1212c9
@@ -1,10 +1,10 @@
|
||||
import { GraphQLString, GraphQLNonNull } from 'graphql';
|
||||
import { GraphQLInt, GraphQLNonNull } from 'graphql';
|
||||
import Connection from '../../models/connection';
|
||||
import connectionType from '../types/connection';
|
||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
||||
|
||||
type Params = {
|
||||
id: string
|
||||
id: number
|
||||
}
|
||||
const verifyConnectionResolver = async (params: Params, req: RequestWithCurrentUser) => {
|
||||
let connection = await Connection.query().findOne({
|
||||
@@ -31,7 +31,7 @@ const verifyConnectionResolver = async (params: Params, req: RequestWithCurrentU
|
||||
const verifyConnection = {
|
||||
type: connectionType,
|
||||
args: {
|
||||
id: { type: GraphQLNonNull(GraphQLString) }
|
||||
id: { type: GraphQLNonNull(GraphQLInt) }
|
||||
},
|
||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) => verifyConnectionResolver(params, req)
|
||||
};
|
||||
|
Reference in New Issue
Block a user