Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdingler committed Nov 15, 2021
0 parents commit f8e727d
Show file tree
Hide file tree
Showing 19 changed files with 366 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#amplify-do-not-edit-begin
amplify/\#current-cloud-backend
amplify/.config/local-*
amplify/logs
amplify/mock-data
amplify/backend/amplify-meta.json
amplify/backend/awscloudformation
amplify/backend/.temp
build/
dist/
node_modules/
aws-exports.js
awsconfiguration.json
amplifyconfiguration.json
amplifyconfiguration.dart
amplify-build-config.json
amplify-gradle-config.json
amplifytools.xcconfig
.secret-*
**.sample
#amplify-do-not-edit-end
15 changes: 15 additions & 0 deletions .graphqlconfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
projects:
BackendBuildTest:
schemaPath: amplify/backend/api/BackendBuildTest/build/schema.graphql
includes:
- src/graphql/**/*.js
excludes:
- ./amplify/**
extensions:
amplify:
codeGenTarget: javascript
generatedFileName: ''
docsFilePath: src/graphql
region: us-west-2
apiId: null
maxDepth: 2
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Backend Build Integration Test

- Uses node v14
- Uses Amplify CLI 5.1.3
- Creates an AppSync API
- Used codegen to generate graphql statements and types
19 changes: 19 additions & 0 deletions amplify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 1
backend:
phases:
preBuild:
commands:
- nvm install 14
- nvm use 14
- npm install -g @aws-amplify/[email protected]
build:
commands:
- amplifyPush --simple
frontend:
phases:
build:
commands:
- echo "true"
artifacts:
baseDirectory: src
files: "**/*"
17 changes: 17 additions & 0 deletions amplify/.config/project-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"projectName": "BackendBuildTest",
"version": "3.1",
"frontend": "javascript",
"javascript": {
"framework": "none",
"config": {
"SourceDir": "src",
"DistributionDir": "dist",
"BuildCommand": "npm run-script build",
"StartCommand": "npm run-script start"
}
},
"providers": [
"awscloudformation"
]
}
8 changes: 8 additions & 0 deletions amplify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Getting Started with Amplify CLI
This directory was generated by [Amplify CLI](https://docs.amplify.aws/cli).

Helpful resources:
- Amplify documentation: https://docs.amplify.aws
- Amplify CLI documentation: https://docs.amplify.aws/cli
- More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files
- Join Amplify's community: https://amplify.aws/community/
5 changes: 5 additions & 0 deletions amplify/backend/api/BackendBuildTest/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"AppSyncApiName": "BackendBuildTest",
"DynamoDBBillingMode": "PAY_PER_REQUEST",
"DynamoDBEnableServerSideEncryption": false
}
2 changes: 2 additions & 0 deletions amplify/backend/api/BackendBuildTest/resolvers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Any resolvers that you add in this directory will override the ones automatically generated by Amplify CLI and will be directly copied to the cloud.
For more information, visit [https://docs.amplify.aws/cli/graphql-transformer/resolvers](https://docs.amplify.aws/cli/graphql-transformer/resolvers)
5 changes: 5 additions & 0 deletions amplify/backend/api/BackendBuildTest/schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type Todo @model {
id: ID!
name: String!
description: String
}
58 changes: 58 additions & 0 deletions amplify/backend/api/BackendBuildTest/stacks/CustomResources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "An auto-generated nested stack.",
"Metadata": {},
"Parameters": {
"AppSyncApiId": {
"Type": "String",
"Description": "The id of the AppSync API associated with this project."
},
"AppSyncApiName": {
"Type": "String",
"Description": "The name of the AppSync API",
"Default": "AppSyncSimpleTransform"
},
"env": {
"Type": "String",
"Description": "The environment name. e.g. Dev, Test, or Production",
"Default": "NONE"
},
"S3DeploymentBucket": {
"Type": "String",
"Description": "The S3 bucket containing all deployment assets for the project."
},
"S3DeploymentRootKey": {
"Type": "String",
"Description": "An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory."
}
},
"Resources": {
"EmptyResource": {
"Type": "Custom::EmptyResource",
"Condition": "AlwaysFalse"
}
},
"Conditions": {
"HasEnvironmentParameter": {
"Fn::Not": [
{
"Fn::Equals": [
{
"Ref": "env"
},
"NONE"
]
}
]
},
"AlwaysFalse": {
"Fn::Equals": ["true", "false"]
}
},
"Outputs": {
"EmptyOutput": {
"Description": "An empty output. You may delete this if you have at least one resource above.",
"Value": ""
}
}
}
4 changes: 4 additions & 0 deletions amplify/backend/api/BackendBuildTest/transform.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"Version": 5,
"ElasticsearchWarning": true
}
20 changes: 20 additions & 0 deletions amplify/backend/backend-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"api": {
"BackendBuildTest": {
"service": "AppSync",
"providerPlugin": "awscloudformation",
"output": {
"authConfig": {
"defaultAuthentication": {
"authenticationType": "API_KEY",
"apiKeyConfig": {
"apiKeyExpirationDays": 365,
"description": ""
}
},
"additionalAuthenticationProviders": []
}
}
}
}
}
10 changes: 10 additions & 0 deletions amplify/backend/tags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"Key": "user:Stack",
"Value": "{project-env}"
},
{
"Key": "user:Application",
"Value": "{project-name}"
}
]
45 changes: 45 additions & 0 deletions amplify/cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"features": {
"graphqltransformer": {
"addmissingownerfields": true,
"improvepluralization": false,
"validatetypenamereservedwords": true,
"useexperimentalpipelinedtransformer": false,
"enableiterativegsiupdates": true,
"secondarykeyasgsi": true,
"skipoverridemutationinputtypes": true
},
"frontend-ios": {
"enablexcodeintegration": true
},
"auth": {
"enablecaseinsensitivity": true,
"useinclusiveterminology": true,
"breakcirculardependency": true,
"forcealiasattributes": false
},
"codegen": {
"useappsyncmodelgenplugin": true,
"usedocsgeneratorplugin": true,
"usetypesgeneratorplugin": true,
"cleangeneratedmodelsdirectory": true,
"retaincasestyle": true,
"addtimestampfields": true,
"handlelistnullabilitytransparently": true,
"emitauthprovider": true,
"generateindexrules": true,
"enabledartnullsafety": true
},
"appsync": {
"generategraphqlpermissions": true
},
"latestregionsupport": {
"pinpoint": 1,
"translate": 1,
"transcribe": 1,
"rekognition": 1,
"textract": 1,
"comprehend": 1
}
}
}
7 changes: 7 additions & 0 deletions amplify/hooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Command Hooks

Command hooks can be used to run custom scripts upon Amplify CLI lifecycle events like pre-push, post-add-function, etc.

To get started, add your script files based on the expected naming convention in this directory.

Learn more about the script file naming convention, hook parameters, third party dependencies, and advanced configurations at https://docs.amplify.aws/cli/usage/command-hooks
45 changes: 45 additions & 0 deletions src/graphql/mutations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* eslint-disable */
// this is an auto generated file. This will be overwritten

export const createTodo = /* GraphQL */ `
mutation CreateTodo(
$input: CreateTodoInput!
$condition: ModelTodoConditionInput
) {
createTodo(input: $input, condition: $condition) {
id
name
description
createdAt
updatedAt
}
}
`;
export const updateTodo = /* GraphQL */ `
mutation UpdateTodo(
$input: UpdateTodoInput!
$condition: ModelTodoConditionInput
) {
updateTodo(input: $input, condition: $condition) {
id
name
description
createdAt
updatedAt
}
}
`;
export const deleteTodo = /* GraphQL */ `
mutation DeleteTodo(
$input: DeleteTodoInput!
$condition: ModelTodoConditionInput
) {
deleteTodo(input: $input, condition: $condition) {
id
name
description
createdAt
updatedAt
}
}
`;
32 changes: 32 additions & 0 deletions src/graphql/queries.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* eslint-disable */
// this is an auto generated file. This will be overwritten

export const getTodo = /* GraphQL */ `
query GetTodo($id: ID!) {
getTodo(id: $id) {
id
name
description
createdAt
updatedAt
}
}
`;
export const listTodos = /* GraphQL */ `
query ListTodos(
$filter: ModelTodoFilterInput
$limit: Int
$nextToken: String
) {
listTodos(filter: $filter, limit: $limit, nextToken: $nextToken) {
items {
id
name
description
createdAt
updatedAt
}
nextToken
}
}
`;
36 changes: 36 additions & 0 deletions src/graphql/subscriptions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* eslint-disable */
// this is an auto generated file. This will be overwritten

export const onCreateTodo = /* GraphQL */ `
subscription OnCreateTodo {
onCreateTodo {
id
name
description
createdAt
updatedAt
}
}
`;
export const onUpdateTodo = /* GraphQL */ `
subscription OnUpdateTodo {
onUpdateTodo {
id
name
description
createdAt
updatedAt
}
}
`;
export const onDeleteTodo = /* GraphQL */ `
subscription OnDeleteTodo {
onDeleteTodo {
id
name
description
createdAt
updatedAt
}
}
`;
11 changes: 11 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Backend Integration Test</title>
</head>
<body>
<h1>Backend builds</h1>
<p>Hello world</p>
</body>
</html>

0 comments on commit f8e727d

Please sign in to comment.