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
  • 795,719
  • 175
  • 1,089
  • 1,143
user2608576
  • 747
  • 2
  • 7
  • 17

0 Answers0