This file contains 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
//DynamoDB table with Primary Key "id" and each item has attributes "title" and "author | |
//If you have an item in the table that only has one of these attributes, the search will fail | |
//Use the below GraphQL schema: | |
type Post { | |
id: ID! | |
title: String! | |
author: String! | |
} |
This file contains 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
const https = require('https'); | |
const AWS = require("aws-sdk"); | |
const urlParse = require("url").URL; | |
const appsyncUrl = process.env.API_BACKENDGRAPHQL_GRAPHQLAPIENDPOINTOUTPUT; | |
const region = process.env.REGION; | |
const endpoint = new urlParse(appsyncUrl).hostname.toString(); | |
const graphqlQuery = require('./query.js').mutation; | |
const apiKey = process.env.API_KEY; | |
exports.handler = async (event) => { |
This file contains 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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* | |
* @format | |
* @flow | |
*/ | |
import React, { useEffect } from 'react'; | |
import { |
This file contains 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
This is an example with a simple TODO schema: | |
```graphql | |
type Todo @model { | |
id: ID! | |
name: String! | |
description: String | |
} | |
``` |