I recently needed to create a GraphQL schema quickly and decided to create this quick guide to help me next time I needed to do something similar GraphQL GraphQL provides an entirely different paradigm from REST APIs. Rather than needing to write a different endpoint / controller to return different data, GraphQL provides clients the opportunity to specify the data they want. GraphQL then returns the specificly request datasets. Schema Here is a sample GraphQL schema containing and organisation and a user Sample Data Sample data is created using in JSON format Root Value The following value accessors are required to retrieve data from the server Starting up the server Here is how the GraphQL server is setup with a node.js express app.
Have you ever created a sample AWS Amplify application and wanted to extend the DynamoDB database schema ? This post explains how to add a single owner parameter to the schema definition and any pitfalls that you may experience AWS Amplify AWS Amplify provides the authentication, Graph API, serverless and CI/CD capabilities in an easy to use format. This post assumes knowledge of these AWS services and that you have created a sample react notes app from the example here Adding Owner Column To add the owner column to the model, update the amplify/backend/api/reactamplified/schema.graphql file as follows and add the following authentication information Execute an amplify push command and ensure that the API is deployed successfully Fix Cognito User Pool Error If you receive the following error: @auth directive with 'userPools' provider found, but the project has no Cognito User Pools authentication provider configured. Execute the command amplify update api and upda...