diff --git a/graphql-cli/src/test/resources/expectedSchemas/schema_gql.graphql b/graphql-cli/src/test/resources/expectedSchemas/schema_gql.graphql index c094f06..80f9d91 100644 --- a/graphql-cli/src/test/resources/expectedSchemas/schema_gql.graphql +++ b/graphql-cli/src/test/resources/expectedSchemas/schema_gql.graphql @@ -2,13 +2,13 @@ type Query { height(height: Decimal!): Decimal! } -"The `Decimal` type corresponds to a subset of IEEE 754-2008 128-bit decimal (radix 10) floating point numbers" -scalar Decimal - type Mutation { singleFileUpload(file: Upload!): String! multipleFileUpload(files: [Upload!]!): String! } +"The `Decimal` type corresponds to a subset of IEEE 754-2008 128-bit decimal (radix 10) floating point numbers" +scalar Decimal + "The `Upload` type represents file upload in a GraphQL schema" scalar Upload diff --git a/graphql-cli/src/test/resources/expectedSchemas/schema_graphql.graphql b/graphql-cli/src/test/resources/expectedSchemas/schema_graphql.graphql index 36da772..1de74c8 100644 --- a/graphql-cli/src/test/resources/expectedSchemas/schema_graphql.graphql +++ b/graphql-cli/src/test/resources/expectedSchemas/schema_graphql.graphql @@ -5,6 +5,10 @@ type Query { human(id: String!): Human } +type Mutation { + createReview(episode: Episode!, reviewInput: ReviewInput!): Review! +} + interface Character { id: String! name: String! @@ -20,23 +24,19 @@ type Human implements Character { appearsIn: [Episode!]! } -enum Episode { - JEDI - EMPIRE - NEWHOPE -} - type Review { episode: Episode stars: Int! commentary: String } -type Mutation { - createReview(episode: Episode!, reviewInput: ReviewInput!): Review! -} - input ReviewInput { stars: Int! commentary: String! } + +enum Episode { + JEDI + EMPIRE + NEWHOPE +} diff --git a/graphql-cli/src/test/resources/expectedSchemas/schema_graphql_docs.graphql b/graphql-cli/src/test/resources/expectedSchemas/schema_graphql_docs.graphql index 42ff996..1ce5f43 100644 --- a/graphql-cli/src/test/resources/expectedSchemas/schema_graphql_docs.graphql +++ b/graphql-cli/src/test/resources/expectedSchemas/schema_graphql_docs.graphql @@ -34,19 +34,21 @@ type Query { planet: Planet } -interface Profile { - "The name of the human" - name( - "" - id: String! +type Mutation { + """ + Add new reviews. + Return the updated review values + """ + createReview( + "Episode name" + episode: Episode! """ - This should be an integer + Review of the episode. - This is a Non-Null type argument + This should be an `input object` type value """ - age: Int! - isAdult: Boolean! - ): String! + reviewInput: ReviewInput! + ): Review! } """ @@ -72,6 +74,27 @@ interface Character implements Profile { ): String! } +"Planet of the Human" +interface Planet { + "The home planet of the human, or null if unknown" + homePlanet: String +} + +interface Profile { + "The name of the human" + name( + "" + id: String! + """ + This should be an integer + + This is a Non-Null type argument + """ + age: Int! + isAdult: Boolean! + ): String! +} + "A humanoid creature from the Star Wars universe" type Human implements Profile & Character & Planet { """ @@ -93,21 +116,6 @@ type Human implements Profile & Character & Planet { appearsIn: [Episode!]! } -"Episodes of Starwars Series" -enum Episode { - "The episode jedi" - JEDI - "" - EMPIRE - """ - The episode new hope. - `Luke Skywalker` joins forces with a Jedi Knight. - - Check new lines in the documentation - """ - NEWHOPE -} - "" type Review { "Number of stars" @@ -117,32 +125,24 @@ type Review { commentary: String } -"Planet of the Human" -interface Planet { - "The home planet of the human, or null if unknown" - homePlanet: String -} - -type Mutation { - """ - Add new reviews. - Return the updated review values - """ - createReview( - "Episode name" - episode: Episode! - """ - Review of the episode. - - This should be an `input object` type value - """ - reviewInput: ReviewInput! - ): Review! -} - "The review input type" input ReviewInput { "Number of stars" stars: Int! commentary: String! } + +"Episodes of Starwars Series" +enum Episode { + "The episode jedi" + JEDI + "" + EMPIRE + """ + The episode new hope. + `Luke Skywalker` joins forces with a Jedi Knight. + + Check new lines in the documentation + """ + NEWHOPE +} diff --git a/graphql-cli/src/test/resources/expectedSchemas/schema_service_3_1.graphql b/graphql-cli/src/test/resources/expectedSchemas/schema_service_3_1.graphql index 98f2ee2..a0a1f6a 100644 --- a/graphql-cli/src/test/resources/expectedSchemas/schema_service_3_1.graphql +++ b/graphql-cli/src/test/resources/expectedSchemas/schema_service_3_1.graphql @@ -2,10 +2,12 @@ type Query { person: Person! } -type Person { - name: String! - age: Int! - address: Address! +type Mutation { + setName(name: String!): Person! +} + +type Subscription { + messages: Int! } type Address { @@ -14,10 +16,8 @@ type Address { city: String! } -type Mutation { - setName(name: String!): Person! -} - -type Subscription { - messages: Int! +type Person { + name: String! + age: Int! + address: Address! } diff --git a/graphql-cli/src/test/resources/expectedSchemas/schema_service_6.graphql b/graphql-cli/src/test/resources/expectedSchemas/schema_service_6.graphql index 36da772..1de74c8 100644 --- a/graphql-cli/src/test/resources/expectedSchemas/schema_service_6.graphql +++ b/graphql-cli/src/test/resources/expectedSchemas/schema_service_6.graphql @@ -5,6 +5,10 @@ type Query { human(id: String!): Human } +type Mutation { + createReview(episode: Episode!, reviewInput: ReviewInput!): Review! +} + interface Character { id: String! name: String! @@ -20,23 +24,19 @@ type Human implements Character { appearsIn: [Episode!]! } -enum Episode { - JEDI - EMPIRE - NEWHOPE -} - type Review { episode: Episode stars: Int! commentary: String } -type Mutation { - createReview(episode: Episode!, reviewInput: ReviewInput!): Review! -} - input ReviewInput { stars: Int! commentary: String! } + +enum Episode { + JEDI + EMPIRE + NEWHOPE +}