TodoDB example with GraphQL
npm installRun the project with functionly CLI
functionly deploy local
functionly startcurl -d '@content/createTodo.json' -H "Content-Type: application/json" -X POST http://localhost:3000/graphqlcurl -d '@content/getByStatus.json' -H "Content-Type: application/json" -X POST http://localhost:3000/graphqlReplace the <todoid> to an existing id value
curl -d '{"query": "{todo(id:\"<todoid>\"){id,name}}"}' -H "Content-Type: application/json" -X POST http://localhost:3000/graphqlCreate and setup your AWS IAM role (Lambda execution)
functionly deployReplace the <gatewayid> after the deployment
curl -d '@content/createTodo.json' -H "Content-Type: application/json" -X POST https://<gatewayid>.execute-api.us-east-1.amazonaws.com/dev/graphqlReplace the <gatewayid> after the deployment
curl -d '@content/getByStatus.json' -H "Content-Type: application/json" -X POST https://<gatewayid>.execute-api.us-east-1.amazonaws.com/dev/graphqlReplace the <gatewayid> after the deployment
Replace the <todoid> to an existing id value
curl -d '{"query": "{todo(id:\"<todoid>\"){id,name}}"}' -H "Content-Type: application/json" -X POST https://<gatewayid>.execute-api.us-east-1.amazonaws.com/dev/graphql