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
agartha
08/28/2017, 11:52 AM
@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
rajit
08/28/2017, 11:53 AM
Thanks. I'm just using the constructor then — it's more direct.
a
agartha
08/28/2017, 11:54 AM
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
rajit
08/28/2017, 11:55 AM
Could you update the documentation? It says context is exposed in Graphcool functions and doesn't mention SchemaExtensions