Below is my code snippet and I would like to use additional argument (.i.e search) for connectionArgs.
const connectionArgs = require('graphql-relay').connectionArgs;
users: {
type: UserConnection.connectionType,
args: {
...connectionArgs,
search: {
type: GraphQLString,
},
},
resolve: async (obj, args, { user }) => {
return UserLoader.loadUsers(user, args);
}
},
Above code works fine when using bable, but I am trying to remove babel (since async await is now supported in node 7.6v). I get Unexpected token for connectionArgs. Could any one suggest how to use this spread properties here ?