Skip to content

Commit

Permalink
Move import of mergeSchemas (#6310)
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie authored Aug 12, 2021
1 parent be69a4d commit 399561b
Show file tree
Hide file tree
Showing 15 changed files with 551 additions and 541 deletions.
14 changes: 14 additions & 0 deletions .changeset/happy-insects-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@keystone-next/example-auth': patch
'@keystone-next/examples-app-basic': patch
'@keystone-next/example-ecommerce': patch
'keystone-next-app': patch
'@keystone-next/example-roles': patch
'@keystone-next/example-extend-graphql-schema': patch
'@keystone-next/example-testing': patch
'@keystone-next/example-with-auth': patch
'@keystone-next/auth': patch
'@keystone-next/keystone': patch
---

Updated dependencies to use `mergeSchemas` from `@graphql-tools/schema`, rather than its old location in `@graphql-tools/merge`. You might see a reordering of the contents of your `graphql.schema` file.
96 changes: 48 additions & 48 deletions examples-staging/auth/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
input CreateInitialUserInput {
name: String
email: String
password: String
}

type Mutation {
createInitialUser(
data: CreateInitialUserInput!
): UserAuthenticationWithPasswordSuccess!
authenticateUserWithPassword(
email: String!
password: String!
): UserAuthenticationWithPasswordResult!
createUser(data: UserCreateInput!): User
createUsers(data: [UserCreateInput!]!): [User]
updateUser(where: UserWhereUniqueInput!, data: UserUpdateInput!): User
updateUsers(data: [UserUpdateArgs!]!): [User]
deleteUser(where: UserWhereUniqueInput!): User
deleteUsers(where: [UserWhereUniqueInput!]!): [User]
endSession: Boolean!
}

union AuthenticatedItem = User

union UserAuthenticationWithPasswordResult =
UserAuthenticationWithPasswordSuccess
| UserAuthenticationWithPasswordFailure

type UserAuthenticationWithPasswordSuccess {
sessionToken: String!
item: User!
}

type UserAuthenticationWithPasswordFailure {
code: PasswordAuthErrorCode!
message: String!
}

enum PasswordAuthErrorCode {
FAILURE
IDENTITY_NOT_FOUND
SECRET_NOT_SET
MULTIPLE_IDENTITY_MATCHES
SECRET_MISMATCH
}

type User {
id: ID!
name: String
Expand Down Expand Up @@ -113,54 +160,8 @@ scalar JSON
url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf"
)

type Mutation {
createUser(data: UserCreateInput!): User
createUsers(data: [UserCreateInput!]!): [User]
updateUser(where: UserWhereUniqueInput!, data: UserUpdateInput!): User
updateUsers(data: [UserUpdateArgs!]!): [User]
deleteUser(where: UserWhereUniqueInput!): User
deleteUsers(where: [UserWhereUniqueInput!]!): [User]
authenticateUserWithPassword(
email: String!
password: String!
): UserAuthenticationWithPasswordResult!
createInitialUser(
data: CreateInitialUserInput!
): UserAuthenticationWithPasswordSuccess!
endSession: Boolean!
}

union AuthenticatedItem = User

union UserAuthenticationWithPasswordResult =
UserAuthenticationWithPasswordSuccess
| UserAuthenticationWithPasswordFailure

type UserAuthenticationWithPasswordSuccess {
sessionToken: String!
item: User!
}

type UserAuthenticationWithPasswordFailure {
code: PasswordAuthErrorCode!
message: String!
}

enum PasswordAuthErrorCode {
FAILURE
IDENTITY_NOT_FOUND
SECRET_NOT_SET
MULTIPLE_IDENTITY_MATCHES
SECRET_MISMATCH
}

input CreateInitialUserInput {
name: String
email: String
password: String
}

type Query {
authenticatedItem: AuthenticatedItem
users(
where: UserWhereInput! = {}
orderBy: [UserOrderByInput!]! = []
Expand All @@ -169,7 +170,6 @@ type Query {
): [User!]
user(where: UserWhereUniqueInput!): User
usersCount(where: UserWhereInput! = {}): Int
authenticatedItem: AuthenticatedItem
keystone: KeystoneMeta!
}

Expand Down
1 change: 0 additions & 1 deletion examples-staging/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"dependencies": {
"@babel/runtime": "^7.14.8",
"@graphql-tools/merge": "^7.0.0",
"@keystone-next/auth": "^30.0.0",
"@keystone-next/document-renderer": "^4.0.0",
"@keystone-next/fields": "^13.0.0",
Expand Down
140 changes: 70 additions & 70 deletions examples-staging/basic/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
type RandomNumber {
number: Int
generatedAt: Int
}

type Mutation {
createRandomPosts: [Post!]!
createInitialUser(
data: CreateInitialUserInput!
): UserAuthenticationWithPasswordSuccess!
authenticateUserWithPassword(
email: String!
password: String!
): UserAuthenticationWithPasswordResult!
createUser(data: UserCreateInput!): User
createUsers(data: [UserCreateInput!]!): [User]
updateUser(where: UserWhereUniqueInput!, data: UserUpdateInput!): User
updateUsers(data: [UserUpdateArgs!]!): [User]
deleteUser(where: UserWhereUniqueInput!): User
deleteUsers(where: [UserWhereUniqueInput!]!): [User]
createPhoneNumber(data: PhoneNumberCreateInput!): PhoneNumber
createPhoneNumbers(data: [PhoneNumberCreateInput!]!): [PhoneNumber]
updatePhoneNumber(
where: PhoneNumberWhereUniqueInput!
data: PhoneNumberUpdateInput!
): PhoneNumber
updatePhoneNumbers(data: [PhoneNumberUpdateArgs!]!): [PhoneNumber]
deletePhoneNumber(where: PhoneNumberWhereUniqueInput!): PhoneNumber
deletePhoneNumbers(where: [PhoneNumberWhereUniqueInput!]!): [PhoneNumber]
createPost(data: PostCreateInput!): Post
createPosts(data: [PostCreateInput!]!): [Post]
updatePost(where: PostWhereUniqueInput!, data: PostUpdateInput!): Post
updatePosts(data: [PostUpdateArgs!]!): [Post]
deletePost(where: PostWhereUniqueInput!): Post
deletePosts(where: [PostWhereUniqueInput!]!): [Post]
endSession: Boolean!
}

input CreateInitialUserInput {
name: String
email: String
password: String
}

union AuthenticatedItem = User

union UserAuthenticationWithPasswordResult =
UserAuthenticationWithPasswordSuccess
| UserAuthenticationWithPasswordFailure

type UserAuthenticationWithPasswordSuccess {
sessionToken: String!
item: User!
}

type UserAuthenticationWithPasswordFailure {
code: PasswordAuthErrorCode!
message: String!
}

enum PasswordAuthErrorCode {
FAILURE
IDENTITY_NOT_FOUND
SECRET_NOT_SET
MULTIPLE_IDENTITY_MATCHES
SECRET_MISMATCH
}

type User {
id: ID!
name: String
Expand Down Expand Up @@ -360,75 +428,9 @@ scalar JSON
url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf"
)

type Mutation {
createUser(data: UserCreateInput!): User
createUsers(data: [UserCreateInput!]!): [User]
updateUser(where: UserWhereUniqueInput!, data: UserUpdateInput!): User
updateUsers(data: [UserUpdateArgs!]!): [User]
deleteUser(where: UserWhereUniqueInput!): User
deleteUsers(where: [UserWhereUniqueInput!]!): [User]
createPhoneNumber(data: PhoneNumberCreateInput!): PhoneNumber
createPhoneNumbers(data: [PhoneNumberCreateInput!]!): [PhoneNumber]
updatePhoneNumber(
where: PhoneNumberWhereUniqueInput!
data: PhoneNumberUpdateInput!
): PhoneNumber
updatePhoneNumbers(data: [PhoneNumberUpdateArgs!]!): [PhoneNumber]
deletePhoneNumber(where: PhoneNumberWhereUniqueInput!): PhoneNumber
deletePhoneNumbers(where: [PhoneNumberWhereUniqueInput!]!): [PhoneNumber]
createPost(data: PostCreateInput!): Post
createPosts(data: [PostCreateInput!]!): [Post]
updatePost(where: PostWhereUniqueInput!, data: PostUpdateInput!): Post
updatePosts(data: [PostUpdateArgs!]!): [Post]
deletePost(where: PostWhereUniqueInput!): Post
deletePosts(where: [PostWhereUniqueInput!]!): [Post]
authenticateUserWithPassword(
email: String!
password: String!
): UserAuthenticationWithPasswordResult!
createInitialUser(
data: CreateInitialUserInput!
): UserAuthenticationWithPasswordSuccess!
createRandomPosts: [Post!]!
endSession: Boolean!
}

union AuthenticatedItem = User

union UserAuthenticationWithPasswordResult =
UserAuthenticationWithPasswordSuccess
| UserAuthenticationWithPasswordFailure

type UserAuthenticationWithPasswordSuccess {
sessionToken: String!
item: User!
}

type UserAuthenticationWithPasswordFailure {
code: PasswordAuthErrorCode!
message: String!
}

enum PasswordAuthErrorCode {
FAILURE
IDENTITY_NOT_FOUND
SECRET_NOT_SET
MULTIPLE_IDENTITY_MATCHES
SECRET_MISMATCH
}

input CreateInitialUserInput {
name: String
email: String
password: String
}

type RandomNumber {
number: Int
generatedAt: Int
}

type Query {
randomNumber: RandomNumber
authenticatedItem: AuthenticatedItem
users(
where: UserWhereInput! = {}
orderBy: [UserOrderByInput!]! = []
Expand All @@ -453,8 +455,6 @@ type Query {
): [Post!]
post(where: PostWhereUniqueInput!): Post
postsCount(where: PostWhereInput! = {}): Int
authenticatedItem: AuthenticatedItem
randomNumber: RandomNumber
keystone: KeystoneMeta!
}

Expand Down
Loading

0 comments on commit 399561b

Please sign in to comment.