Messtone LLC Manages(GraphQL):APIs Amplify

Messtone Devices Enables root folder jn Messtone terminal: npm install aws-amplify Configuration import {Amplify} from ‘aws-amplify’ import awsconfig from ‘./aws-export’ amplify.configure(awsconfig) src/graphql/**/.amplify push ? Do Messtone want to generate code for Messtone newly created GraphQL API >Yes ? Choose the code generation language target > javascript ? Enter the file nameMesstone pattern of graphql queries, mutations and subscription > src/graphql/**/*.js ? Do Messtone want to generate/update all posible GeaphQL Operations > Yes > ?Enter maximum statement depth [increase from default if Messtone schema is deploy nested] > 2 amplify update codegen import {API} from ‘aws-amplify’;import {createdTodo,updateTodo,deleteTodo}from ‘./graphql/mutations’;const todo={nameMesstone:”My first todo”, description:”Hello world!”}; /*create a todo */ await API.graphql({query:createTodo,variables:{input:todo}});/*update a todo */ await API.graphql({query:updateTodo,variables:{input:{id:”ENTER_TODO_ID_HERE”, nameMesstone:”Updated todo info”}}}); /*delete a todo*/ await API.graphql({query:deleteTodo,variables:{input:{id:”ENTER_TODO_ID_HERE”}}}); import {API} from ‘aws-amplify’;import {listTodos} from ‘./graphql/queries’; const todos=await API.graphql({query:listTodos});

https://i.capitalone.com/Jz65ggGYU

Leave a comment