Skip to content

Commit

Permalink
Merge pull request #289 from maxschmeling/285-fix-graphql-updates
Browse files Browse the repository at this point in the history
Fixed GraphQL hard-coded resource name on updates
  • Loading branch information
pmcnr-hx authored Jun 1, 2017
2 parents 756d55c + e9c30ac commit 7bebc2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/graphQl/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resolvers.create = (resourceConfig, parent, args, req, ast) => {
}

resolvers.update = (resourceConfig, parent, args, req, ast) => {
const path = `${jsonApi._apiConfig.pathPrefix + resourceConfig.resource}/${args.tags.id}`
const path = `${jsonApi._apiConfig.pathPrefix + resourceConfig.resource}/${args[resourceConfig.resource].id}`
const data = resolvers.generateResourceFromArgs(args, resourceConfig)
return resolvers.rerouteTo('PATCH', path, { data }, req, ast)
}
Expand Down

0 comments on commit 7bebc2c

Please sign in to comment.