Isaac Lee Morris
09/21/2017, 7:40 AMIsaac Lee Morris
09/21/2017, 7:40 AM"use latest";
require("babel-polyfill");
const { fromEvent } = require("graphcool-lib");
module.exports = async event => {
const api = fromEvent(event).api("simple/v1");
const query = `
query {
allDataSources {
id
}
}
`;
const result = await api.request(query);
const { allDataSources } = result;
return {
data: {
dataSourceIds: allDataSources.map(dataSource => dataSource.id)
}
};
};
halborg
09/21/2017, 7:47 AMnilan
09/21/2017, 7:48 AMhalborg
09/21/2017, 7:48 AMhalborg
09/21/2017, 7:49 AMnilan
09/21/2017, 7:50 AMIsaac Lee Morris
09/21/2017, 8:06 AMIsaac Lee Morris
09/21/2017, 8:06 AMIsaac Lee Morris
09/21/2017, 8:06 AMIsaac Lee Morris
09/21/2017, 8:07 AMkyriakosmichael
09/21/2017, 8:09 AMLeiZeng
09/21/2017, 10:07 AMnilan
09/21/2017, 10:18 AMfreddie-codogo
09/21/2017, 10:33 AMCannot find module './CLI'
error using the most up-to-date version of the graphcool CLI?slackday
09/21/2017, 11:18 AMjoar
09/21/2017, 1:19 PMmplis
09/21/2017, 2:28 PMfilter
vs passing an array of objects with single fields to filter.AND
?mplis
09/21/2017, 2:30 PMquery1
the same as query2
?joar
09/21/2017, 2:37 PMnotrab
09/21/2017, 3:11 PMgraphcool-cli
error. Be great if anyone here could help duplicate this and report back. https://github.com/graphcool/graphcool/issues/551#issuecomment-331177758notrab
09/21/2017, 3:12 PMstephenhandley
09/21/2017, 3:28 PMEmailUser
type is created, I'm assuming this is in lieu of a User
type? If so, what are the best practices for adding additional fields to that type?wesbos
09/21/2017, 3:43 PMwesbos
09/21/2017, 3:43 PMwesbos
09/21/2017, 3:45 PMexport const ADD_TO_CART_MUTATION = gql`
mutation AddToCart($userId: ID!, $itemId: ID!) {
addToCartItems(userUserId: $userId, cartItemId: $itemId) {
cartItem {
id
title
price
}
}
}
`;
Lockevn
09/21/2017, 3:56 PMwesbos
09/21/2017, 4:00 PMIsaac Lee Morris
09/21/2017, 4:06 PMmwickett
09/21/2017, 5:28 PM