-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #802 from aws-amplify/main
Release
- Loading branch information
Showing
56 changed files
with
3,876 additions
and
636 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Closed Issue Message | ||
on: | ||
issues: | ||
types: [closed] | ||
jobs: | ||
auto_comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: aws-actions/closed-issue-message@v1 | ||
with: | ||
# These inputs are both required | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
message: | | ||
This issue is now closed. Comments on closed issues are hard for our team to see. | ||
If you need more assistance, please open a new issue that references this one. |
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 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
53 changes: 53 additions & 0 deletions
53
packages/amplify-codegen-e2e-tests/schemas/admin-modelgen.graphql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
input AMPLIFY { globalAuthRule: AuthRule = { allow: public } } # FOR TESTING ONLY! | ||
|
||
type Todo @model { | ||
id: ID! | ||
name: String! | ||
description: String | ||
phone: Phone | ||
} | ||
type Phone { | ||
number: String | ||
} | ||
enum BillingSource { | ||
CLIENT | ||
PROJECT | ||
} | ||
input CustomInput { | ||
customField1: String! | ||
customField2: BillingSource | ||
customField3: NestedInput! | ||
} | ||
input NestedInput { | ||
content: String! = "hello" | ||
} | ||
interface ICustom { | ||
firstName: String! | ||
lastName: String | ||
birthdays: [INestedCustom!]! | ||
} | ||
interface INestedCustom { | ||
birthDay: AWSDate! | ||
} | ||
# The member types of a Union type must all be Object base types. | ||
union CustomUnion = Todo | Phone | ||
|
||
type Query { | ||
getAllTodo(msg: String, input: CustomInput): String @function(name: "echofunction-${env}") | ||
echo(msg: String!): String | ||
echo2(todoId: ID!): Todo | ||
echo3: [Todo!]! | ||
echo4(number: String): Phone | ||
echo5: [CustomUnion!]! | ||
echo6(customInput: CustomInput): String! | ||
echo7: [ICustom]! | ||
echo8(msg: [Float], msg2: [Int!], enumType: BillingSource, enumList: [BillingSource], inputType: [CustomInput]): [String] | ||
echo9(msg: [Float]!, msg2: [Int!]!, enumType: BillingSource!, enumList: [BillingSource!]!, inputType: [CustomInput!]!): [String!]! | ||
|
||
} | ||
type Mutation { | ||
mutate(msg: [String!]!): Todo | ||
} | ||
type Subscription { | ||
onMutate(msg: String): [Todo!] | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/amplify-codegen-e2e-tests/src/__tests__/push-codegen-admin-modelgen.test.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { DEFAULT_JS_CONFIG, createNewProjectDir } from "@aws-amplify/amplify-codegen-e2e-core"; | ||
import { deleteAmplifyProject, testPushAdminModelgen, testPushCodegen } from "../codegen-tests-base"; | ||
|
||
const schema = 'admin-modelgen.graphql'; | ||
|
||
describe('Amplify push with codegen tests - admin modelgen', () => { | ||
let projectRoot: string; | ||
beforeEach(async () => { | ||
projectRoot = await createNewProjectDir('pushCodegenAdminModelgen'); | ||
}); | ||
|
||
afterEach(async () => { | ||
await deleteAmplifyProject(projectRoot); | ||
}); | ||
|
||
it(`should not throw error for executing the admin modelgen step required by studio CMS usage post push given the schema with input, union and interface types`, async () => { | ||
await testPushAdminModelgen(DEFAULT_JS_CONFIG, projectRoot, schema); | ||
}); | ||
}); |
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 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 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 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 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
Oops, something went wrong.