Skip to content

Commit

Permalink
commit missing test files
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalp committed Jan 18, 2024
1 parent 4efe2d2 commit 640f22e
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 0 deletions.
59 changes: 59 additions & 0 deletions tests/main/graphql_schemas/example/expected_schema.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
type Query {
users(country: String): [User!]!
}

type Mutation {
userCreate(userData: UserCreateInput!): User
userPreferences(data: UserPreferencesInput): Boolean!
}

input UserCreateInput {
firstName: String
lastName: String
email: String!
favouriteColor: Color
location: LocationInput
}

input LocationInput {
city: String
country: String
}

type User {
id: ID!
firstName: String
lastName: String
email: String!
favouriteColor: Color
location: Location
}

type Location {
city: String
country: String
}

enum Color {
BLACK
WHITE
RED
GREEN
BLUE
YELLOW
}

input UserPreferencesInput {
luckyNumber: Int = 7
favouriteWord: String = "word"
colorOpacity: Float = 1
excludedTags: [String!] = ["offtop", "tag123"]
notificationsPreferences: NotificationsPreferencesInput! = {receiveMails: true, receivePushNotifications: true, receiveSms: false, title: "Mr"}
}

input NotificationsPreferencesInput {
receiveMails: Boolean!
receivePushNotifications: Boolean!
receiveSms: Boolean!
title: String!
}
59 changes: 59 additions & 0 deletions tests/main/graphql_schemas/example/expected_schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
type Query {
users(country: String): [User!]!
}

type Mutation {
userCreate(userData: UserCreateInput!): User
userPreferences(data: UserPreferencesInput): Boolean!
}

input UserCreateInput {
firstName: String
lastName: String
email: String!
favouriteColor: Color
location: LocationInput
}

input LocationInput {
city: String
country: String
}

type User {
id: ID!
firstName: String
lastName: String
email: String!
favouriteColor: Color
location: Location
}

type Location {
city: String
country: String
}

enum Color {
BLACK
WHITE
RED
GREEN
BLUE
YELLOW
}

input UserPreferencesInput {
luckyNumber: Int = 7
favouriteWord: String = "word"
colorOpacity: Float = 1
excludedTags: [String!] = ["offtop", "tag123"]
notificationsPreferences: NotificationsPreferencesInput! = {receiveMails: true, receivePushNotifications: true, receiveSms: false, title: "Mr"}
}

input NotificationsPreferencesInput {
receiveMails: Boolean!
receivePushNotifications: Boolean!
receiveSms: Boolean!
title: String!
}
3 changes: 3 additions & 0 deletions tests/main/graphql_schemas/example/pyproject-schema-gql.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.ariadne-codegen]
schema_path = "schema.graphql"
target_file_path = "expected_schema.gql"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.ariadne-codegen]
schema_path = "schema.graphql"
target_file_path = "expected_schema.graphql"

0 comments on commit 640f22e

Please sign in to comment.