In the meantime I guess I'll have to hard-code the...
# prisma-whats-new
r
In the meantime I guess I'll have to hard-code the endpoint and PAT in the function, but maybe you guys could update the documentation with the right way of doing it. It's a bit unclear from this: https://www.graph.cool/docs/reference/functions/graphcool-lib-kaegh4oomu/ The example hard-codes data in the event, but surely that's supposed to be given to the function
a
@rajit The context is only provided automatically to Schema Extensions. For regular RP hook functions and SSS functions, you need to construct it like in the link.
r
Thanks. I'm just using the constructor then — it's more direct.
a
That's also a good approach. Using the 'fromEvent' syntax has the benefit of an easier transformation when Graphcool will also add the context to RP and SSS though. But either ways work.
r
Could you update the documentation? It says context is exposed in Graphcool functions and doesn't mention SchemaExtensions
a
Could you create that issue here: https://github.com/graphcool/content/issues So the guys at Graphcool can pick it up?
r
Ah thanks, done. And thank you for your help!
😎 1
n
thanks for bringing this up @rajit will take a look later today 🙂