Join Slack
Powered by
how to restrict access to resolver functions? righ...
# orm-help
j
jsan
07/16/2018, 4:20 PM
how to restrict access to resolver functions? right now they can be executed by anyone if they have the project url
v
veksen
07/16/2018, 4:22 PM
you can see an example here:
veksen
07/16/2018, 4:22 PM
https://github.com/prismagraphql/graphql-server-example/blob/master/src/resolvers/Mutation/addPaymentMethod.ts#L4
veksen
07/16/2018, 4:23 PM
using the
getUserId
https://github.com/prismagraphql/graphql-server-example/blob/master/src/utils.ts#L9-L20
veksen
07/16/2018, 4:25 PM
alternatively, if you need a more complex solution, there is a package:
https://github.com/maticzav/graphql-shield
j
jsan
07/16/2018, 4:28 PM
thanks
2
Views
Open in Slack
Previous
Next