This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { ApolloClient, InMemoryCache, ApolloProvider, createHttpLink } from '@apollo/client'; | |
import { setContext } from '@apollo/client/link/context'; | |
import AsyncStorage from '@react-native-async-storage/async-storage'; | |
import { persistCache, AsyncStorageWrapper } from 'apollo3-cache-persist'; | |
// Create an HTTP link to the GraphQL server | |
const httpLink = createHttpLink({ | |
uri: 'https://your-graphql-endpoint.com/graphql', | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getCognitoCreds() { | |
console.log("starting function getCognitoCreds"); | |
var cognitoUser = cognitoFactory.getCognitoUser(); | |
cognitoUser.getSession(function(err, session) { | |
if (err) { | |
console.log(err, err.stack); | |
console.log("error getting the session"); | |
} else { | |
if (session.isValid() === false) { | |
console.log("session is not valid"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ContactUsFormApi: | |
Properties: | |
Body: | |
basePath: /dksheffield/ContactUsForm/1.0.0 | |
host: virtserver.swaggerhub.com | |
info: | |
contact: | |
email: [email protected] | |
description: Contact Us API | |
license: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ContactUsFormApi: | |
Type: "AWS::ApiGateway::RestApi" | |
Properties: | |
Description: "A test API" | |
Name: | |
Ref: AWS::StackName | |
Body: | |
swagger: '2.0' | |
info: | |
description: Contact Us API |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ContactUsFormApi: | |
Type: "AWS::Serverless::Api" | |
Properties: | |
StageName: prod | |
DefinitionBody: | |
swagger: '2.0' | |
info: | |
description: Contact Us API | |
version: 1.0.0 | |
title: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Loading function'); | |
var Promise = require('promise'); | |
doPromiseOne() | |
.then(doPromiseTwo) | |
.then(doPromiseThree); | |
function doPromiseOne() { |