0

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 ?

Felix Kling
  • 756,363
  • 169
  • 1,062
  • 1,111
user2608576
  • 617
  • 1
  • 7
  • 16

0 Answers0