donald
11/09/2017, 11:03 PMimport { fromEvent } from "graphcool-lib";
export default async event => {
const projectId = event.context.projectId;
const api = fromEvent({ context: { graphcool: { projectId } } }).api(
"simple/v1"
);
return api.request(reminderContactQuery, { reminderId }).then(result => {
// do some stuff in here and return the result
})
}
wontwon
11/09/2017, 11:55 PMTroy Sandal
11/10/2017, 12:12 AMimport { fromEvent } from 'graphcool-lib'
export default async event => {
const lib = fromEvent(event)
const client = lib.api('simple/v1')
const {allUsers} = await client.request(`{allUsers{id}}`)
return {
data: {
event: allUsers
}
}
}
Troy Sandal
11/10/2017, 12:18 AMnpm install graphcool-lib
donald
11/10/2017, 1:04 AMaurnik
11/10/2017, 1:26 AMambethia
11/10/2017, 1:38 AMambethia
11/10/2017, 1:39 AMambethia
11/10/2017, 1:40 AMagartha
11/10/2017, 2:05 AMMatt
11/10/2017, 2:17 AMTavo
11/10/2017, 5:11 AMfrankspin
11/10/2017, 8:31 AMSteven Sacks
11/10/2017, 8:40 AMSteven Sacks
11/10/2017, 8:40 AMconst graphcool = fromEvent(event);
const api = graphcool.api('simple/v1');
Steven Sacks
11/10/2017, 8:40 AMVinnie
11/10/2017, 9:04 AMVinnie
11/10/2017, 9:04 AMSlackbot
11/10/2017, 10:02 AMSteven Sacks
11/10/2017, 10:11 AMrandomnerd
11/10/2017, 10:13 AMSteven Sacks
11/10/2017, 10:16 AMrandomnerd
11/10/2017, 10:18 AMSteven Sacks
11/10/2017, 10:18 AMVinnie
11/10/2017, 10:55 AMVinnie
11/10/2017, 10:55 AMrandomnerd
11/10/2017, 11:02 AMrandomnerd
11/10/2017, 11:03 AMVinnie
11/10/2017, 11:03 AM