-
Notifications
You must be signed in to change notification settings - Fork 0
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 #54 from eyakauleva/49
graphQL integration testing
- Loading branch information
Showing
18 changed files
with
344 additions
and
102 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,4 @@ | ||
type Mutation { | ||
createUser(user: UserInput!, commandBy: String!): Es | ||
deleteUser(id: ID!, commandBy: String!): Es | ||
} |
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,5 @@ | ||
type Query { | ||
getAllUsers: [User] | ||
findUserById(userId: ID!): User | ||
findByCriteria(criteria: CriteriaInput!, size: Int! @Min(value: 1), page: Int! @Min): [User] | ||
} |
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
src/main/resources/graphql/typedefinitions/directives.graphqls
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,5 @@ | ||
directive @NotBlank(message : String = "graphql.validation.NotBlank.message") | ||
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ||
|
||
directive @Min(value : Int = 0, message : String = "graphql.validation.Min.message") | ||
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION |
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,13 @@ | ||
enum Gender { | ||
MALE | ||
FEMALE | ||
UNSET | ||
} | ||
|
||
enum EyesColor { | ||
BLUE | ||
GREEN | ||
BROWN | ||
GREY | ||
UNSET | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/resources/graphql/typedefinitions/inputs.graphqls
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,26 @@ | ||
input UserInput { | ||
firstName: String! @NotBlank | ||
lastName: String! @NotBlank | ||
email: String! @NotBlank | ||
phone: String! @NotBlank | ||
age: Int | ||
gender: Gender | ||
height: Float | ||
weight: Float | ||
eyesColor: EyesColor | ||
startStudyYear: Int | ||
endStudyYear: Int | ||
} | ||
|
||
input CriteriaInput { | ||
name: String | ||
phone: String | ||
age: Int | ||
heightFrom: Float | ||
heightTo: Float | ||
weightFrom: Float | ||
weightTo: Float | ||
genders: [Gender] | ||
eyesColors: [EyesColor] | ||
studyYear: Int | ||
} |
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 @@ | ||
scalar LocalDateTime |
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,24 @@ | ||
type User { | ||
id: ID | ||
firstName: String! | ||
lastName: String! | ||
email: String! | ||
phone: String! | ||
age: Int | ||
gender: Gender | ||
height: Float | ||
weight: Float | ||
eyesColor: EyesColor | ||
startStudyYear: Int | ||
endStudyYear: Int | ||
} | ||
|
||
type Es { | ||
id: ID | ||
type: String | ||
time: LocalDateTime | ||
createdBy: String | ||
entityId: String | ||
payload: String | ||
status: String | ||
} |
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.