is there a way to use user token instead of pat in...
# prisma-whats-new
m
is there a way to use user token instead of pat in “graphcool-lib” ?
a
Yes the api() method has a second parameter
options
with a property `token`:
Copy code
import Graphcool from 'graphcool-lib'

const graphcool = new Graphcool('__PROJECT_ID__')
const api = graphcool.api('simple/v1', { token: '__TOKEN__')
m
thx. its very useful for resolver because i can rely on the permission system when i use the request user token.
👍🏻 1