-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
10 changed files
with
284 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystone-6/core': minor | ||
--- | ||
|
||
Adds `config.graphql.schemaPath` |
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
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
209 changes: 209 additions & 0 deletions
209
tests/cli-tests/fixtures/custom-graphql-path/different_schema.graphql
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,209 @@ | ||
# This file is automatically generated by Keystone, do not modify it manually. | ||
# Modify your Keystone config when you want to change this. | ||
|
||
type Todo { | ||
id: ID! | ||
title: String | ||
} | ||
|
||
input TodoWhereUniqueInput { | ||
id: ID | ||
} | ||
|
||
input TodoWhereInput { | ||
AND: [TodoWhereInput!] | ||
OR: [TodoWhereInput!] | ||
NOT: [TodoWhereInput!] | ||
id: IDFilter | ||
title: StringFilter | ||
} | ||
|
||
input IDFilter { | ||
equals: ID | ||
in: [ID!] | ||
notIn: [ID!] | ||
lt: ID | ||
lte: ID | ||
gt: ID | ||
gte: ID | ||
not: IDFilter | ||
} | ||
|
||
input StringFilter { | ||
equals: String | ||
in: [String!] | ||
notIn: [String!] | ||
lt: String | ||
lte: String | ||
gt: String | ||
gte: String | ||
contains: String | ||
startsWith: String | ||
endsWith: String | ||
not: NestedStringFilter | ||
} | ||
|
||
input NestedStringFilter { | ||
equals: String | ||
in: [String!] | ||
notIn: [String!] | ||
lt: String | ||
lte: String | ||
gt: String | ||
gte: String | ||
contains: String | ||
startsWith: String | ||
endsWith: String | ||
not: NestedStringFilter | ||
} | ||
|
||
input TodoOrderByInput { | ||
id: OrderDirection | ||
title: OrderDirection | ||
} | ||
|
||
enum OrderDirection { | ||
asc | ||
desc | ||
} | ||
|
||
input TodoUpdateInput { | ||
title: String | ||
} | ||
|
||
input TodoUpdateArgs { | ||
where: TodoWhereUniqueInput! | ||
data: TodoUpdateInput! | ||
} | ||
|
||
input TodoCreateInput { | ||
title: String | ||
} | ||
|
||
""" | ||
The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). | ||
""" | ||
scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf") | ||
|
||
type Mutation { | ||
createTodo(data: TodoCreateInput!): Todo | ||
createTodos(data: [TodoCreateInput!]!): [Todo] | ||
updateTodo(where: TodoWhereUniqueInput!, data: TodoUpdateInput!): Todo | ||
updateTodos(data: [TodoUpdateArgs!]!): [Todo] | ||
deleteTodo(where: TodoWhereUniqueInput!): Todo | ||
deleteTodos(where: [TodoWhereUniqueInput!]!): [Todo] | ||
} | ||
|
||
type Query { | ||
todos(where: TodoWhereInput! = {}, orderBy: [TodoOrderByInput!]! = [], take: Int, skip: Int! = 0, cursor: TodoWhereUniqueInput): [Todo!] | ||
todo(where: TodoWhereUniqueInput!): Todo | ||
todosCount(where: TodoWhereInput! = {}): Int | ||
keystone: KeystoneMeta! | ||
} | ||
|
||
type KeystoneMeta { | ||
adminMeta: KeystoneAdminMeta! | ||
} | ||
|
||
type KeystoneAdminMeta { | ||
lists: [KeystoneAdminUIListMeta!]! | ||
list(key: String!): KeystoneAdminUIListMeta | ||
} | ||
|
||
type KeystoneAdminUIListMeta { | ||
key: String! | ||
itemQueryName: String! | ||
listQueryName: String! | ||
hideCreate: Boolean! | ||
hideDelete: Boolean! | ||
path: String! | ||
label: String! | ||
singular: String! | ||
plural: String! | ||
description: String | ||
initialColumns: [String!]! | ||
pageSize: Int! | ||
labelField: String! | ||
fields: [KeystoneAdminUIFieldMeta!]! | ||
groups: [KeystoneAdminUIFieldGroupMeta!]! | ||
initialSort: KeystoneAdminUISort | ||
isHidden: Boolean! | ||
isSingleton: Boolean! | ||
} | ||
|
||
type KeystoneAdminUIFieldMeta { | ||
path: String! | ||
label: String! | ||
description: String | ||
isOrderable: Boolean! | ||
isFilterable: Boolean! | ||
isNonNull: [KeystoneAdminUIFieldMetaIsNonNull!] | ||
fieldMeta: JSON | ||
viewsIndex: Int! | ||
customViewsIndex: Int | ||
createView: KeystoneAdminUIFieldMetaCreateView! | ||
listView: KeystoneAdminUIFieldMetaListView! | ||
itemView(id: ID): KeystoneAdminUIFieldMetaItemView | ||
search: QueryMode | ||
} | ||
|
||
enum KeystoneAdminUIFieldMetaIsNonNull { | ||
read | ||
create | ||
update | ||
} | ||
|
||
type KeystoneAdminUIFieldMetaCreateView { | ||
fieldMode: KeystoneAdminUIFieldMetaCreateViewFieldMode! | ||
} | ||
|
||
enum KeystoneAdminUIFieldMetaCreateViewFieldMode { | ||
edit | ||
hidden | ||
} | ||
|
||
type KeystoneAdminUIFieldMetaListView { | ||
fieldMode: KeystoneAdminUIFieldMetaListViewFieldMode! | ||
} | ||
|
||
enum KeystoneAdminUIFieldMetaListViewFieldMode { | ||
read | ||
hidden | ||
} | ||
|
||
type KeystoneAdminUIFieldMetaItemView { | ||
fieldMode: KeystoneAdminUIFieldMetaItemViewFieldMode | ||
fieldPosition: KeystoneAdminUIFieldMetaItemViewFieldPosition | ||
} | ||
|
||
enum KeystoneAdminUIFieldMetaItemViewFieldMode { | ||
edit | ||
read | ||
hidden | ||
} | ||
|
||
enum KeystoneAdminUIFieldMetaItemViewFieldPosition { | ||
form | ||
sidebar | ||
} | ||
|
||
enum QueryMode { | ||
default | ||
insensitive | ||
} | ||
|
||
type KeystoneAdminUIFieldGroupMeta { | ||
label: String! | ||
description: String | ||
fields: [KeystoneAdminUIFieldMeta!]! | ||
} | ||
|
||
type KeystoneAdminUISort { | ||
field: String! | ||
direction: KeystoneAdminUISortDirection! | ||
} | ||
|
||
enum KeystoneAdminUISortDirection { | ||
ASC | ||
DESC | ||
} |
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,22 @@ | ||
import { list, config } from '@keystone-6/core'; | ||
import { allowAll } from '@keystone-6/core/access'; | ||
import { text } from '@keystone-6/core/fields'; | ||
|
||
export default config({ | ||
db: { | ||
provider: 'sqlite', | ||
url: 'file:./app.db', | ||
}, | ||
ui: { isDisabled: true }, | ||
lists: { | ||
Todo: list({ | ||
access: allowAll, | ||
fields: { | ||
title: text(), | ||
}, | ||
}), | ||
}, | ||
graphql: { | ||
schemaPath: 'different_schema.graphql', | ||
}, | ||
}); |
17 changes: 17 additions & 0 deletions
17
tests/cli-tests/fixtures/custom-graphql-path/schema.prisma
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,17 @@ | ||
// This file is automatically generated by Keystone, do not modify it manually. | ||
// Modify your Keystone config when you want to change this. | ||
|
||
datasource sqlite { | ||
url = env("DATABASE_URL") | ||
shadowDatabaseUrl = env("SHADOW_DATABASE_URL") | ||
provider = "sqlite" | ||
} | ||
|
||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
model Todo { | ||
id String @id @default(cuid()) | ||
title String @default("") | ||
} |
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