vladblindu
09/29/2017, 7:38 PMeruby
09/29/2017, 8:30 PMimranansari
09/29/2017, 9:28 PMimranansari
09/29/2017, 9:30 PMdannyql
09/29/2017, 11:29 PMdannyql
09/29/2017, 11:44 PMquery { user { ... } } will always be the authed useralbinekb
09/30/2017, 12:38 AMmartin
09/30/2017, 12:51 AMmyapi.generate()), those codes then get stored in my graphcool account, and at some point my client’s customers would then consume the codes (myapi.destroy('DKns83l2dn39'), at which point they’d get deleted. So far I’ve only worked with GraphQL in one and the same project. Do you know of any resources I could use graphcool for to “build” an API that my client could then use in various other places and websites? How would that even work?Amit
09/30/2017, 1:27 AMAmit
09/30/2017, 1:27 AMagartha
09/30/2017, 9:08 AMrein
09/30/2017, 10:18 AMrein
09/30/2017, 10:19 AMrein
09/30/2017, 10:19 AMrein
09/30/2017, 10:21 AMrein
09/30/2017, 10:21 AMexport const currentUserQuery = gql`
query currentUser {
user {
id
name
}
}rein
09/30/2017, 11:26 AMrein
09/30/2017, 11:26 AMconst FacebookAuthButton = ({ signInToFacebook }) => (
<SocialIcon title="Sign In With Facebook" button type="facebook" onPress={signInToFacebook} />
);
FacebookAuthButton.propTypes = {
signInToFacebook: PropTypes.func.isRequired,
};
const authenticateFacebookUserQuery = gql`
// WHAT DO I NEED TO ADD HERE
`;
export default compose(
graphql(authenticateFacebookUserQuery, { name: authenticateFacebookUser }),
withHandlers({
signInToFacebook: props => async () => {
const { token } = await Expo.Facebook.logInWithReadPermissionsAsync('123456789', {
permissions: ['public_profile', 'email'],
});
// CALL MUTATION
},
}),
)(FacebookAuthButton);rein
09/30/2017, 11:26 AMrein
09/30/2017, 11:26 AMnilan
09/30/2017, 11:27 AMwontwon
09/30/2017, 1:51 PMwontwon
09/30/2017, 1:51 PMrein
09/30/2017, 1:57 PMrein
09/30/2017, 2:00 PMconst { jwt } = await props.authenticate ...coolboyjules
09/30/2017, 4:09 PMcoolboyjules
09/30/2017, 4:17 PM"errorMessage":{"45":"U","98":"c","113":"S","34":"e","67":"e","169":"<","120":" ","153":"n","93":"\"","158":"\r","142":"l","147":"1","12":"d","66":"h","89":"h","51":"l","124":"p","84":"o","8":"<","73":"<","164":"d","170":"/","78":" ","175":">","19":"e","100":"n","23":"3","62":"e","135":"a","128":"r","4":"l","121":"T","88":"w","77":"y","40":"r","110":"0","15":"t","11":"a","104":">","90":"i","9":"h","141":"b","139":"l","132":" ","44":" ","33":"T","117":"i","22":"0","56":"<","55":"e","163":"o","26":"e","134":"n","50":"i","123":"m","174":"l","37":"o","68":"a","166":">","61":"l","107":"1","13":">","46":"n","99":"e","177":"\n","24":" ","155":"e","94":">","83":"l","35":"m","16":"i","79":"b","152":"e","5":">","103":"r","112":" ","72":"\n","10":"e","159":"\n","59":"i","144":"<","87":"\"","48":"v","21":"5","116":"v","76":"d","138":"i","54":"l","43":"y","148":">","127":"a","65":"/","71":"\r","57":"/","108":">","32":" ","80":"g","106":"h","137":"a","82":"o","49":"a","6":"\r","126":"r","36":"p","1":"h","39":"a","140":"a","173":"m","17":"t","25":"S","60":"t","14":"<","133":"U","47":"a","122":"e","111":"3","102":"e","31":"e","96":"\n","69":"d","162":"b","151":"c","95":"\r","58":"t","145":"/","64":"<","status":503,"53":"b","42":"l","75":"o","115":"r","156":"r","109":"5","0":"<","149":"<","20":">","27":"r","70":">","2":"t","86":"=","38":"r","81":"c","167":"\r","160":"<","118":"c","171":"h","165":"y","92":"e","125":"o","18":"l","101":"t","154":"t","30":"c","7":"\n","143":"e","97":"<","130":"l","114":"e","129":"i","29":"i","41":"i","168":"\n","105":"<","63":">","150":"/","3":"m","74":"b","91":"t","52":"a","85":"r","172":"t","131":"y","28":"v","119":"e","161":"/","136":"v","157":">","146":"h","176":"\r"}nilan
09/30/2017, 4:43 PMrein
09/30/2017, 6:30 PM