-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
3,260 additions
and
28 deletions.
There are no files selected for viewing
243 changes: 243 additions & 0 deletions
243
...-validate-transformer/src/__tests__/__snapshots__/duplicate-validation-types.test.ts.snap
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,243 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Duplicate Validation Types Valid usage accepts different validation types on same field 1`] = ` | ||
"type Post { | ||
id: ID! | ||
title: String! | ||
rating: Float! | ||
score: Int! | ||
description: String! | ||
createdAt: AWSDateTime! | ||
updatedAt: AWSDateTime! | ||
} | ||
input ModelStringInput { | ||
ne: String | ||
eq: String | ||
le: String | ||
lt: String | ||
ge: String | ||
gt: String | ||
contains: String | ||
notContains: String | ||
between: [String] | ||
beginsWith: String | ||
attributeExists: Boolean | ||
attributeType: ModelAttributeTypes | ||
size: ModelSizeInput | ||
} | ||
input ModelIntInput { | ||
ne: Int | ||
eq: Int | ||
le: Int | ||
lt: Int | ||
ge: Int | ||
gt: Int | ||
between: [Int] | ||
attributeExists: Boolean | ||
attributeType: ModelAttributeTypes | ||
} | ||
input ModelFloatInput { | ||
ne: Float | ||
eq: Float | ||
le: Float | ||
lt: Float | ||
ge: Float | ||
gt: Float | ||
between: [Float] | ||
attributeExists: Boolean | ||
attributeType: ModelAttributeTypes | ||
} | ||
input ModelBooleanInput { | ||
ne: Boolean | ||
eq: Boolean | ||
attributeExists: Boolean | ||
attributeType: ModelAttributeTypes | ||
} | ||
input ModelIDInput { | ||
ne: ID | ||
eq: ID | ||
le: ID | ||
lt: ID | ||
ge: ID | ||
gt: ID | ||
contains: ID | ||
notContains: ID | ||
between: [ID] | ||
beginsWith: ID | ||
attributeExists: Boolean | ||
attributeType: ModelAttributeTypes | ||
size: ModelSizeInput | ||
} | ||
input ModelSubscriptionStringInput { | ||
ne: String | ||
eq: String | ||
le: String | ||
lt: String | ||
ge: String | ||
gt: String | ||
contains: String | ||
notContains: String | ||
between: [String] | ||
beginsWith: String | ||
in: [String] | ||
notIn: [String] | ||
} | ||
input ModelSubscriptionIntInput { | ||
ne: Int | ||
eq: Int | ||
le: Int | ||
lt: Int | ||
ge: Int | ||
gt: Int | ||
between: [Int] | ||
in: [Int] | ||
notIn: [Int] | ||
} | ||
input ModelSubscriptionFloatInput { | ||
ne: Float | ||
eq: Float | ||
le: Float | ||
lt: Float | ||
ge: Float | ||
gt: Float | ||
between: [Float] | ||
in: [Float] | ||
notIn: [Float] | ||
} | ||
input ModelSubscriptionBooleanInput { | ||
ne: Boolean | ||
eq: Boolean | ||
} | ||
input ModelSubscriptionIDInput { | ||
ne: ID | ||
eq: ID | ||
le: ID | ||
lt: ID | ||
ge: ID | ||
gt: ID | ||
contains: ID | ||
notContains: ID | ||
between: [ID] | ||
beginsWith: ID | ||
in: [ID] | ||
notIn: [ID] | ||
} | ||
enum ModelAttributeTypes { | ||
binary | ||
binarySet | ||
bool | ||
list | ||
map | ||
number | ||
numberSet | ||
string | ||
stringSet | ||
_null | ||
} | ||
input ModelSizeInput { | ||
ne: Int | ||
eq: Int | ||
le: Int | ||
lt: Int | ||
ge: Int | ||
gt: Int | ||
between: [Int] | ||
} | ||
enum ModelSortDirection { | ||
ASC | ||
DESC | ||
} | ||
type ModelPostConnection { | ||
items: [Post]! | ||
nextToken: String | ||
} | ||
input ModelPostFilterInput { | ||
id: ModelIDInput | ||
title: ModelStringInput | ||
rating: ModelFloatInput | ||
score: ModelIntInput | ||
description: ModelStringInput | ||
createdAt: ModelStringInput | ||
updatedAt: ModelStringInput | ||
and: [ModelPostFilterInput] | ||
or: [ModelPostFilterInput] | ||
not: ModelPostFilterInput | ||
} | ||
type Query { | ||
getPost(id: ID!): Post | ||
listPosts(filter: ModelPostFilterInput, limit: Int, nextToken: String): ModelPostConnection | ||
} | ||
input ModelPostConditionInput { | ||
title: ModelStringInput | ||
rating: ModelFloatInput | ||
score: ModelIntInput | ||
description: ModelStringInput | ||
and: [ModelPostConditionInput] | ||
or: [ModelPostConditionInput] | ||
not: ModelPostConditionInput | ||
createdAt: ModelStringInput | ||
updatedAt: ModelStringInput | ||
} | ||
input CreatePostInput { | ||
id: ID | ||
title: String! | ||
rating: Float! | ||
score: Int! | ||
description: String! | ||
} | ||
input UpdatePostInput { | ||
id: ID! | ||
title: String | ||
rating: Float | ||
score: Int | ||
description: String | ||
} | ||
input DeletePostInput { | ||
id: ID! | ||
} | ||
type Mutation { | ||
createPost(input: CreatePostInput!, condition: ModelPostConditionInput): Post | ||
updatePost(input: UpdatePostInput!, condition: ModelPostConditionInput): Post | ||
deletePost(input: DeletePostInput!, condition: ModelPostConditionInput): Post | ||
} | ||
input ModelSubscriptionPostFilterInput { | ||
id: ModelSubscriptionIDInput | ||
title: ModelSubscriptionStringInput | ||
rating: ModelSubscriptionFloatInput | ||
score: ModelSubscriptionIntInput | ||
description: ModelSubscriptionStringInput | ||
createdAt: ModelSubscriptionStringInput | ||
updatedAt: ModelSubscriptionStringInput | ||
and: [ModelSubscriptionPostFilterInput] | ||
or: [ModelSubscriptionPostFilterInput] | ||
} | ||
type Subscription { | ||
onCreatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"createPost\\"]) | ||
onUpdatePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"updatePost\\"]) | ||
onDeletePost(filter: ModelSubscriptionPostFilterInput): Post @aws_subscribe(mutations: [\\"deletePost\\"]) | ||
} | ||
" | ||
`; |
Oops, something went wrong.