-
Notifications
You must be signed in to change notification settings - Fork 18
feat: Custom type and ref arg handling in SchemaProcessor with tests #412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
d25d07f
5db42f8
d5da91e
18f07fd
8a4f55f
733d674
4e49d64
63ab733
3dbb490
396ab36
bc16c49
523adfa
e7493a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,16 @@ | ||
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
|
||
| exports[`CustomOperation transform dynamo schema Custom Mutation w required arg and enum 1`] = ` | ||
| "type Post @model @auth(rules: [{allow: private}]) | ||
| { | ||
| title: String | ||
| } | ||
|
|
||
| enum LikePostReactionType { | ||
| "enum LikePostReactionType { | ||
| :shipit: | ||
| :risitas: | ||
| } | ||
|
|
||
| type Post @model @auth(rules: [{allow: private}]) | ||
| { | ||
| title: String | ||
| } | ||
|
|
||
| type Mutation { | ||
| likePost(postId: String!, reactionType: LikePostReactionType): Post | ||
| }" | ||
|
|
@@ -45,8 +45,7 @@ exports[`CustomOperation transform dynamo schema Custom mutation w inline boolea | |
| `; | ||
|
|
||
| exports[`CustomOperation transform dynamo schema Custom mutation w inline custom return type 1`] = ` | ||
| "type LikePostReturnType | ||
| { | ||
| "type LikePostReturnType { | ||
| stringField: String | ||
| intField: Int | ||
| floatField: Float | ||
|
|
@@ -109,8 +108,7 @@ type Query { | |
| `; | ||
|
|
||
| exports[`CustomOperation transform dynamo schema Custom query w inline custom return type 1`] = ` | ||
| "type GetPostDetailsReturnType | ||
| { | ||
| "type GetPostDetailsReturnType { | ||
| stringField: String | ||
| intField: Int | ||
| floatField: Float | ||
|
|
@@ -258,8 +256,7 @@ type Subscription { | |
| `; | ||
|
|
||
| exports[`CustomOperation transform dynamo schema custom subscriptions Custom subscription where .for() resource has a CustomType return type 1`] = ` | ||
| "type CreateCustomTypePostReturnType @aws_api_key | ||
| { | ||
| "type CreateCustomTypePostReturnType { | ||
|
||
| title: String! | ||
| } | ||
|
|
||
|
|
@@ -340,8 +337,7 @@ exports[`CustomOperation transform dynamo schema handlers a.handler.custom a.han | |
| title: String | ||
| } | ||
|
|
||
| type GetPostDetailsReturnType @aws_api_key | ||
| { | ||
| type GetPostDetailsReturnType { | ||
|
|
||
| } | ||
|
|
||
|
|
@@ -351,8 +347,7 @@ type Query { | |
| `; | ||
|
|
||
| exports[`CustomOperation transform dynamo schema handlers a.handler.custom a.handler.custom with auth works 1`] = ` | ||
| "type GetPostDetailsReturnType @aws_cognito_user_pools(cognito_groups: ["groupA", "groupB"]) | ||
| { | ||
| "type GetPostDetailsReturnType { | ||
|
|
||
| } | ||
|
|
||
|
|
@@ -373,8 +368,7 @@ type Query { | |
| `; | ||
|
|
||
| exports[`CustomOperation transform dynamo schema handlers a.handler.function defineFunction 1`] = ` | ||
| "type GetPostDetailsReturnType @aws_cognito_user_pools | ||
| { | ||
| "type GetPostDetailsReturnType { | ||
|
|
||
| } | ||
|
|
||
|
|
@@ -395,8 +389,7 @@ type Query { | |
| `; | ||
|
|
||
| exports[`CustomOperation transform dynamo schema handlers a.handler.function defineFunction async - sync 1`] = ` | ||
| "type GetPostDetailsReturnType @aws_cognito_user_pools | ||
| { | ||
| "type GetPostDetailsReturnType { | ||
|
|
||
| } | ||
|
|
||
|
|
@@ -428,8 +421,7 @@ type Query { | |
| `; | ||
|
|
||
| exports[`CustomOperation transform dynamo schema handlers a.handler.function pipeline / mix 1`] = ` | ||
| "type GetPostDetailsReturnType @aws_cognito_user_pools | ||
| { | ||
| "type GetPostDetailsReturnType { | ||
|
|
||
| } | ||
|
|
||
|
|
@@ -439,8 +431,7 @@ type Query { | |
| `; | ||
|
|
||
| exports[`CustomOperation transform dynamo schema handlers a.handler.function string 1`] = ` | ||
| "type GetPostDetailsReturnType @aws_cognito_user_pools | ||
| { | ||
| "type GetPostDetailsReturnType { | ||
|
|
||
| } | ||
|
|
||
|
|
@@ -450,8 +441,7 @@ type Query { | |
| `; | ||
|
|
||
| exports[`CustomOperation transform dynamo schema handlers a.handler.inlineSql escapes quotes 1`] = ` | ||
| "type GetPostDetailsReturnType @aws_cognito_user_pools | ||
| { | ||
| "type GetPostDetailsReturnType { | ||
|
|
||
| } | ||
|
|
||
|
|
@@ -472,8 +462,7 @@ exports[`CustomOperation transform dynamo schema handlers a.handler.inlineSql wo | |
| "functionSlots": [], | ||
| "jsFunctions": [], | ||
| "lambdaFunctions": {}, | ||
| "schema": "type GetPostDetailsReturnType @aws_cognito_user_pools | ||
| { | ||
| "schema": "type GetPostDetailsReturnType { | ||
|
|
||
| } | ||
|
|
||
|
|
@@ -484,8 +473,7 @@ type Query { | |
| `; | ||
|
|
||
| exports[`CustomOperation transform dynamo schema handlers a.handler.sqlReference works 1`] = ` | ||
| "type GetPostDetailsReturnType @aws_cognito_user_pools | ||
| { | ||
| "type GetPostDetailsReturnType { | ||
|
|
||
| } | ||
|
|
||
|
|
@@ -545,6 +533,17 @@ type Query { | |
| }" | ||
| `; | ||
|
|
||
| exports[`custom operations + custom type auth inheritance inline custom type inherits auth rules from referencing op 1`] = ` | ||
| "type MyQueryReturnType { | ||
| fieldA: String | ||
| fieldB: Int | ||
| } | ||
|
|
||
| type Query { | ||
| myQuery: MyQueryReturnType @function(name: "myFn") @auth(rules: [{allow: public, provider: apiKey}]) | ||
| }" | ||
| `; | ||
|
|
||
| exports[`custom operations + custom type auth inheritance nested custom types inherit auth rules from top-level referencing op 1`] = ` | ||
| "type MyQueryReturnType @aws_api_key | ||
| { | ||
|
|
||
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.