![]() * chore(datastore): CPK integ tests to use async APIs * add new models and updated schema file |
||
---|---|---|
.. | ||
AWSDataStorePrimaryKeyBaseTest.swift | ||
AWSDataStorePrimaryKeyTests.swift | ||
README.md |
README.md
DataStore Primary Key Integration Tests
The following steps demonstrate how to setup a GraphQL endpoint with AppSync and IAM.
This configuration is used to run the tests in AWSDataStorePrimaryKeyTest.swift
.
Set-up
-
amplify init
-
amplify add api
? Select from one of the below mentioned services: GraphQL
? Here is the GraphQL API that we will create. Select a setting to edit or continue Authorization modes: API key (default, expiration time: 7 days fro
m now)
? Choose the default authorization type for the API: "API key"
? Configure additional auth types? "No"
? Here is the GraphQL API that we will create. Select a setting to edit or continue Conflict detection (required for DataStore): Auto Merge
? Here is the GraphQL API that we will create. Select a setting to edit or continue (Use arrow keys)
Name: datastorepkinteg
Authorization modes: API key
Conflict detection (required for DataStore): Enabled
Conflict resolution strategy: Auto Merge
? Choose a schema template: Blank Schema
Copy the content of the schema from AWSDataStoreCategoryPluginIntegrationTests/PrimaryKey/schema.graphql
into the newly created schema.graphql
file
-
amplify update api
? Please select from one of the below mentioned services:GraphQL
? Select from the options belowEnable DataStore for entire API
-
amplify push
? Are you sure you want to continue? `Yes`
? Do you want to generate code for your newly created GraphQL API `No`
- Copy
amplifyconfiguration.json
to a new file namedAWSDataStoreCategoryPluginPrimaryKeyIntegrationTests-amplifyconfiguration.json
inside~/.aws-amplify/amplify-ios/testconfiguration/
Now you can run the AWSDataStoreCategoryPluginPrimaryKeyIntegrationTests