create-keystone-app 5.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/create-keystone-app.cjs.dev.js +26 -32
- package/dist/create-keystone-app.cjs.prod.js +26 -32
- package/package.json +2 -2
- package/starter/.keystone/admin/.next/build-manifest.json +30 -0
- package/starter/.keystone/admin/.next/cache/webpack/client-development/0.pack +0 -0
- package/starter/.keystone/admin/.next/cache/webpack/client-development/index.pack +0 -0
- package/starter/.keystone/admin/.next/cache/webpack/server-development/0.pack +0 -0
- package/starter/.keystone/admin/.next/cache/webpack/server-development/index.pack +0 -0
- package/starter/.keystone/admin/.next/react-loadable-manifest.json +1 -0
- package/starter/.keystone/admin/.next/server/middleware-manifest.json +6 -0
- package/starter/.keystone/admin/.next/server/pages/_app.js +1534 -0
- package/starter/.keystone/admin/.next/server/pages/_document.js +156 -0
- package/starter/.keystone/admin/.next/server/pages/_error.js +56 -0
- package/starter/.keystone/admin/.next/server/pages/api/__keystone_api_build.js +123 -0
- package/starter/.keystone/admin/.next/server/pages-manifest.json +6 -0
- package/starter/.keystone/admin/.next/server/webpack-api-runtime.js +168 -0
- package/starter/.keystone/admin/.next/server/webpack-runtime.js +168 -0
- package/starter/.keystone/admin/.next/static/chunks/amp.js +366 -0
- package/starter/.keystone/admin/.next/static/chunks/main.js +1251 -0
- package/starter/.keystone/admin/.next/static/chunks/pages/_app.js +10481 -0
- package/starter/.keystone/admin/.next/static/chunks/pages/_error.js +28 -0
- package/starter/.keystone/admin/.next/static/chunks/polyfills.js +1 -0
- package/starter/.keystone/admin/.next/static/chunks/react-refresh.js +62 -0
- package/starter/.keystone/admin/.next/static/chunks/webpack.js +1202 -0
- package/starter/.keystone/admin/.next/static/development/_buildManifest.js +1 -0
- package/starter/.keystone/admin/.next/static/development/_middlewareManifest.js +1 -0
- package/starter/.keystone/admin/.next/static/development/_ssgManifest.js +1 -0
- package/starter/.keystone/admin/.next/trace +26 -0
- package/starter/.keystone/admin/next-env.d.ts +6 -0
- package/starter/.keystone/admin/next.config.js +4 -0
- package/starter/.keystone/admin/pages/_app.js +19 -0
- package/starter/.keystone/admin/pages/api/__keystone_api_build.js +3 -0
- package/starter/.keystone/admin/pages/index.js +1 -0
- package/starter/.keystone/admin/pages/init.js +5 -0
- package/starter/.keystone/admin/pages/no-access.js +3 -0
- package/starter/.keystone/admin/pages/posts/[id].js +3 -0
- package/starter/.keystone/admin/pages/posts/index.js +3 -0
- package/starter/.keystone/admin/pages/signin.js +3 -0
- package/starter/.keystone/admin/pages/tags/[id].js +3 -0
- package/starter/.keystone/admin/pages/tags/index.js +3 -0
- package/starter/.keystone/admin/pages/users/[id].js +3 -0
- package/starter/.keystone/admin/pages/users/index.js +3 -0
- package/starter/.keystone/admin/tsconfig.json +22 -0
- package/starter/CHANGELOG.md +32 -0
- package/starter/README.md +7 -7
- package/starter/auth.ts +32 -3
- package/starter/keystone.db +0 -0
- package/starter/keystone.ts +16 -9
- package/starter/package.json +12 -9
- package/starter/schema.graphql +132 -72
- package/starter/schema.prisma +12 -12
- package/starter/schema.ts +63 -17
- package/CHANGELOG.md +0 -151
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getApp } from '@keystone-next/keystone/___internal-do-not-use-will-break-in-patch/admin-ui/pages/App';
|
|
2
|
+
|
|
3
|
+
import * as view0 from "../../../../../node_modules/@keystone-next/keystone/___internal-do-not-use-will-break-in-patch/admin-ui/id-field-view";
|
|
4
|
+
import * as view1 from "../../../../../node_modules/@keystone-next/keystone/fields/types/text/views";
|
|
5
|
+
import * as view2 from "../../../../../node_modules/@keystone-next/keystone/fields/types/password/views";
|
|
6
|
+
import * as view3 from "../../../../../node_modules/@keystone-next/keystone/fields/types/relationship/views";
|
|
7
|
+
import * as view4 from "../../../../../node_modules/@keystone-next/keystone/fields/types/select/views";
|
|
8
|
+
import * as view5 from "../../../../../node_modules/@keystone-next/fields-document/views";
|
|
9
|
+
import * as view6 from "../../../../../node_modules/@keystone-next/keystone/fields/types/timestamp/views";
|
|
10
|
+
|
|
11
|
+
var adminConfig = {};
|
|
12
|
+
|
|
13
|
+
export default getApp({
|
|
14
|
+
lazyMetadataQuery: {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"keystone","loc":{"start":22,"end":30}},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adminMeta","loc":{"start":39,"end":48}},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lists","loc":{"start":59,"end":64}},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key","loc":{"start":77,"end":80}},"arguments":[],"directives":[],"loc":{"start":77,"end":80}},{"kind":"Field","name":{"kind":"Name","value":"isHidden","loc":{"start":91,"end":99}},"arguments":[],"directives":[],"loc":{"start":91,"end":99}},{"kind":"Field","name":{"kind":"Name","value":"fields","loc":{"start":110,"end":116}},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"path","loc":{"start":131,"end":135}},"arguments":[],"directives":[],"loc":{"start":131,"end":135}},{"kind":"Field","name":{"kind":"Name","value":"createView","loc":{"start":148,"end":158}},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fieldMode","loc":{"start":175,"end":184}},"arguments":[],"directives":[],"loc":{"start":175,"end":184}}],"loc":{"start":159,"end":198}},"loc":{"start":148,"end":198}}],"loc":{"start":117,"end":210}},"loc":{"start":110,"end":210}}],"loc":{"start":65,"end":220}},"loc":{"start":59,"end":220}}],"loc":{"start":49,"end":228}},"loc":{"start":39,"end":228}}],"loc":{"start":31,"end":234}},"loc":{"start":22,"end":234}},{"kind":"Field","name":{"kind":"Name","value":"authenticatedItem"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]},
|
|
15
|
+
fieldViews: [view0,view1,view2,view3,view4,view5,view6],
|
|
16
|
+
adminMetaHash: "2qivu7",
|
|
17
|
+
adminConfig: adminConfig,
|
|
18
|
+
apiPath: "/api/graphql",
|
|
19
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HomePage as default } from '@keystone-next/keystone/___internal-do-not-use-will-break-in-patch/admin-ui/pages/HomePage';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { getSigninPage } from '@keystone-next/auth/pages/SigninPage'
|
|
2
|
+
|
|
3
|
+
export default getSigninPage({"identityField":"email","secretField":"password","mutationName":"authenticateUserWithPassword","successTypename":"UserAuthenticationWithPasswordSuccess","failureTypename":"UserAuthenticationWithPasswordFailure"});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"esModuleInterop": true,
|
|
4
|
+
"jsx": "preserve",
|
|
5
|
+
"lib": ["esnext", "dom"],
|
|
6
|
+
"outDir": "dist",
|
|
7
|
+
"sourceMap": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"target": "es5",
|
|
10
|
+
"allowJs": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"module": "esnext",
|
|
15
|
+
"moduleResolution": "node",
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"incremental": true
|
|
19
|
+
},
|
|
20
|
+
"exclude": ["node_modules"],
|
|
21
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
|
|
22
|
+
}
|
package/starter/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# keystone-next-app
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#260](https://github.com/keystonejs/create-keystone-app/pull/260) [`6288ac4`](https://github.com/keystonejs/create-keystone-app/commit/6288ac493d82a4f4f669f70daa2f24cefd8e375e) Thanks [@bladey](https://github.com/bladey)! - Updated to use Keystone 6.
|
|
8
|
+
|
|
9
|
+
## 3.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#241](https://github.com/keystonejs/create-keystone-app/pull/241) [`d6ff06d`](https://github.com/keystonejs/create-keystone-app/commit/d6ff06d3a80830f37d5da07738a69e0af2edc039) Thanks [@bladey](https://github.com/bladey)! - Added engines to package.json to indicate required version of Node.js to run Keystone.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#237](https://github.com/keystonejs/create-keystone-app/pull/237) [`a65ef75`](https://github.com/keystonejs/create-keystone-app/commit/a65ef75c8ca21007aade0c77a6482cbf145ff679) Thanks [@renovate](https://github.com/apps/renovate)! - Updated Keystone dependencies to latest version.
|
|
18
|
+
|
|
19
|
+
## 3.0.2
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#235](https://github.com/keystonejs/create-keystone-app/pull/235) [`9a3c00c`](https://github.com/keystonejs/create-keystone-app/commit/9a3c00cb6a719cef330955f8014f431c0ffa38d0) Thanks [@bladey](https://github.com/bladey)! - Updated Keystone dependencies to latest version.
|
|
24
|
+
|
|
25
|
+
## 3.0.1
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- [#218](https://github.com/keystonejs/create-keystone-app/pull/218) [`7547ee5`](https://github.com/keystonejs/create-keystone-app/commit/7547ee505c056cf18e7f9a6babdc0f51205b7d8c) Thanks [@renovate](https://github.com/apps/renovate)! - Updated Keystone dependencies to latest version.
|
|
30
|
+
|
|
31
|
+
* [#207](https://github.com/keystonejs/create-keystone-app/pull/207) [`f449831`](https://github.com/keystonejs/create-keystone-app/commit/f4498310ea66db1b287701e2e50a2486617859d9) Thanks [@Noviny](https://github.com/Noviny)! - Add code comments to help out new users
|
|
32
|
+
|
|
33
|
+
- [#212](https://github.com/keystonejs/create-keystone-app/pull/212) [`906412a`](https://github.com/keystonejs/create-keystone-app/commit/906412a1b3b791eeca90225e585c1bd91369a503) Thanks [@bladey](https://github.com/bladey)! - Updated README to refer to latest DB property when advising to use PostgresSQL.
|
|
34
|
+
|
|
3
35
|
## 3.0.0
|
|
4
36
|
|
|
5
37
|
### Major Changes
|
package/starter/README.md
CHANGED
|
@@ -20,30 +20,30 @@ If you want an overview of all the features Keystone offers, check out our [feat
|
|
|
20
20
|
|
|
21
21
|
### Changing the database
|
|
22
22
|
|
|
23
|
-
We've set you up with an [SQLite database](https://keystonejs.com/docs/apis/config#sqlite) for ease-of-use. If you're wanting to use
|
|
23
|
+
We've set you up with an [SQLite database](https://keystonejs.com/docs/apis/config#sqlite) for ease-of-use. If you're wanting to use PostgreSQL, you can!
|
|
24
24
|
|
|
25
25
|
Just change the `db` property on line 16 of the Keystone file [./keystone.ts](./keystone.ts) to
|
|
26
26
|
|
|
27
27
|
```typescript
|
|
28
28
|
db: {
|
|
29
|
-
|
|
29
|
+
provider: 'postgresql',
|
|
30
30
|
url: process.env.DATABASE_URL || 'DATABASE_URL_TO_REPLACE',
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
And provide your database url from
|
|
34
|
+
And provide your database url from PostgreSQL.
|
|
35
35
|
|
|
36
|
-
For more on database configuration, check out or [
|
|
36
|
+
For more on database configuration, check out or [DB API Docs](https://keystonejs.com/docs/apis/config#db)
|
|
37
37
|
|
|
38
38
|
### Auth
|
|
39
39
|
|
|
40
|
-
We've put auth into its own file to make this humble starter easier to navigate. To explore it without auth turned on, comment out the `isAccessAllowed` on line 21 of the
|
|
40
|
+
We've put auth into its own file to make this humble starter easier to navigate. To explore it without auth turned on, comment out the `isAccessAllowed` on line 21 of the Keystone file [./keystone.ts](./keystone.ts).
|
|
41
41
|
|
|
42
|
-
For more on auth, check out our [
|
|
42
|
+
For more on auth, check out our [Authentication API Docs](https://keystonejs.com/docs/apis/auth#authentication-api)
|
|
43
43
|
|
|
44
44
|
### Adding a frontend
|
|
45
45
|
|
|
46
|
-
As a Headless CMS, Keystone can be used with any frontend that uses GraphQL. It provides a GraphQL endpoint you can write queries against at `/api/graphql` (by default [http://localhost:3000/api/graphql](http://localhost:3000/api/graphql)). At Thinkmill, we tend to use [Next.js](https://nextjs.org/) and [Apollo
|
|
46
|
+
As a Headless CMS, Keystone can be used with any frontend that uses GraphQL. It provides a GraphQL endpoint you can write queries against at `/api/graphql` (by default [http://localhost:3000/api/graphql](http://localhost:3000/api/graphql)). At Thinkmill, we tend to use [Next.js](https://nextjs.org/) and [Apollo GraphQL](https://www.apollographql.com/docs/react/get-started/) as our frontend and way to write queries, but if you have your own favourite, feel free to use it.
|
|
47
47
|
|
|
48
48
|
A walkthrough on how to do this is forthcoming, but in the meantime our [todo example](https://github.com/keystonejs/keystone-react-todo-demo) shows a Keystone set up with a frontend. For a more full example, you can also look at an example app we built for [Prisma Day 2021](https://github.com/keystonejs/prisma-day-2021-workshop)
|
|
49
49
|
|
package/starter/auth.ts
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
Welcome to the auth file! Here we have put a config to do basic auth in Keystone.
|
|
3
|
+
|
|
4
|
+
`createAuth` is an implementation for an email-password login out of the box.
|
|
5
|
+
`statelessSessions` is a base implementation of session logic.
|
|
6
|
+
|
|
7
|
+
For more on auth, check out: https://keystonejs.com/docs/apis/auth#authentication-api
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { createAuth } from '@keystone-6/auth';
|
|
11
|
+
|
|
12
|
+
// See https://keystonejs.com/docs/apis/session#session-api for the session docs
|
|
13
|
+
import { statelessSessions } from '@keystone-6/core/session';
|
|
2
14
|
|
|
3
15
|
let sessionSecret = process.env.SESSION_SECRET;
|
|
4
16
|
|
|
17
|
+
// Here is a best practice! It's fine to not have provided a session secret in dev,
|
|
18
|
+
// however it should always be there in production.
|
|
5
19
|
if (!sessionSecret) {
|
|
6
20
|
if (process.env.NODE_ENV === 'production') {
|
|
7
21
|
throw new Error(
|
|
@@ -12,14 +26,29 @@ if (!sessionSecret) {
|
|
|
12
26
|
}
|
|
13
27
|
}
|
|
14
28
|
|
|
29
|
+
// Here we define how auth relates to our schemas.
|
|
30
|
+
// What we are saying here is that we want to use the list `User`, and to log in
|
|
31
|
+
// we will need their email and password.
|
|
15
32
|
const { withAuth } = createAuth({
|
|
16
33
|
listKey: 'User',
|
|
17
34
|
identityField: 'email',
|
|
18
|
-
secretField: 'password',
|
|
19
35
|
sessionData: 'name',
|
|
36
|
+
secretField: 'password',
|
|
20
37
|
initFirstItem: {
|
|
38
|
+
// If there are no items in the database, keystone will ask you to create
|
|
39
|
+
// a new user, filling in these fields.
|
|
21
40
|
fields: ['name', 'email', 'password'],
|
|
22
41
|
},
|
|
23
42
|
});
|
|
24
43
|
|
|
25
|
-
|
|
44
|
+
// This defines how long people will remain logged in for.
|
|
45
|
+
// This will get refreshed when they log back in.
|
|
46
|
+
let sessionMaxAge = 60 * 60 * 24 * 30; // 30 days
|
|
47
|
+
|
|
48
|
+
// This defines how sessions should work. For more details, check out: https://keystonejs.com/docs/apis/session#session-api
|
|
49
|
+
const session = statelessSessions({
|
|
50
|
+
maxAge: sessionMaxAge,
|
|
51
|
+
secret: sessionSecret!,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export { withAuth, session };
|
|
Binary file
|
package/starter/keystone.ts
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
Welcome to Keystone! This file is what keystone uses to start the app.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
It looks at the default export, and expects a Keystone config object.
|
|
5
|
+
|
|
6
|
+
You can find all the config options in our docs here: https://keystonejs.com/docs/apis/config
|
|
7
|
+
*/
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
import { config } from '@keystone-6/core';
|
|
10
|
+
|
|
11
|
+
// Look in the schema file for how we define our lists, and how users interact with them through graphql or the Admin UI
|
|
12
|
+
import { lists } from './schema';
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
secret: sessionSecret!,
|
|
12
|
-
});
|
|
14
|
+
// Keystone auth is configured separately - check out the basic auth setup we are importing from our auth file.
|
|
15
|
+
import { withAuth, session } from './auth';
|
|
13
16
|
|
|
14
17
|
export default withAuth(
|
|
18
|
+
// Using the config function helps typescript guide you to the available options.
|
|
15
19
|
config({
|
|
20
|
+
// the db sets the database provider - we're using sqlite for the fastest startup experience
|
|
16
21
|
db: {
|
|
17
22
|
provider: 'sqlite',
|
|
18
23
|
url: 'file:./keystone.db',
|
|
19
24
|
},
|
|
25
|
+
// This config allows us to set up features of the Admin UI https://keystonejs.com/docs/apis/config#ui
|
|
20
26
|
ui: {
|
|
27
|
+
// For our starter, we check that someone has session data before letting them see the Admin UI.
|
|
21
28
|
isAccessAllowed: (context) => !!context.session?.data,
|
|
22
29
|
},
|
|
23
30
|
lists,
|
package/starter/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keystone-app",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
|
-
"dev": "keystone
|
|
7
|
-
"start": "keystone
|
|
8
|
-
"build": "keystone
|
|
9
|
-
"postinstall": "keystone
|
|
6
|
+
"dev": "keystone dev",
|
|
7
|
+
"start": "keystone start",
|
|
8
|
+
"build": "keystone build",
|
|
9
|
+
"postinstall": "keystone postinstall"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@keystone-
|
|
13
|
-
"@keystone-
|
|
14
|
-
"@keystone-
|
|
15
|
-
"typescript": "^4.
|
|
12
|
+
"@keystone-6/auth": "^1.0.0",
|
|
13
|
+
"@keystone-6/core": "^1.0.0",
|
|
14
|
+
"@keystone-6/fields-document": "^1.0.0",
|
|
15
|
+
"typescript": "^4.5.2"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": "^14.15 || ^16.13"
|
|
16
19
|
}
|
|
17
20
|
}
|
package/starter/schema.graphql
CHANGED
|
@@ -1,65 +1,6 @@
|
|
|
1
1
|
# This file is automatically generated by Keystone, do not modify it manually.
|
|
2
2
|
# Modify your Keystone config when you want to change this.
|
|
3
3
|
|
|
4
|
-
input CreateInitialUserInput {
|
|
5
|
-
name: String
|
|
6
|
-
email: String
|
|
7
|
-
password: String
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
type Mutation {
|
|
11
|
-
createInitialUser(
|
|
12
|
-
data: CreateInitialUserInput!
|
|
13
|
-
): UserAuthenticationWithPasswordSuccess!
|
|
14
|
-
authenticateUserWithPassword(
|
|
15
|
-
email: String!
|
|
16
|
-
password: String!
|
|
17
|
-
): UserAuthenticationWithPasswordResult!
|
|
18
|
-
createUser(data: UserCreateInput!): User
|
|
19
|
-
createUsers(data: [UserCreateInput!]!): [User]
|
|
20
|
-
updateUser(where: UserWhereUniqueInput!, data: UserUpdateInput!): User
|
|
21
|
-
updateUsers(data: [UserUpdateArgs!]!): [User]
|
|
22
|
-
deleteUser(where: UserWhereUniqueInput!): User
|
|
23
|
-
deleteUsers(where: [UserWhereUniqueInput!]!): [User]
|
|
24
|
-
createPost(data: PostCreateInput!): Post
|
|
25
|
-
createPosts(data: [PostCreateInput!]!): [Post]
|
|
26
|
-
updatePost(where: PostWhereUniqueInput!, data: PostUpdateInput!): Post
|
|
27
|
-
updatePosts(data: [PostUpdateArgs!]!): [Post]
|
|
28
|
-
deletePost(where: PostWhereUniqueInput!): Post
|
|
29
|
-
deletePosts(where: [PostWhereUniqueInput!]!): [Post]
|
|
30
|
-
createTag(data: TagCreateInput!): Tag
|
|
31
|
-
createTags(data: [TagCreateInput!]!): [Tag]
|
|
32
|
-
updateTag(where: TagWhereUniqueInput!, data: TagUpdateInput!): Tag
|
|
33
|
-
updateTags(data: [TagUpdateArgs!]!): [Tag]
|
|
34
|
-
deleteTag(where: TagWhereUniqueInput!): Tag
|
|
35
|
-
deleteTags(where: [TagWhereUniqueInput!]!): [Tag]
|
|
36
|
-
endSession: Boolean!
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
union AuthenticatedItem = User
|
|
40
|
-
|
|
41
|
-
union UserAuthenticationWithPasswordResult =
|
|
42
|
-
UserAuthenticationWithPasswordSuccess
|
|
43
|
-
| UserAuthenticationWithPasswordFailure
|
|
44
|
-
|
|
45
|
-
type UserAuthenticationWithPasswordSuccess {
|
|
46
|
-
sessionToken: String!
|
|
47
|
-
item: User!
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
type UserAuthenticationWithPasswordFailure {
|
|
51
|
-
code: PasswordAuthErrorCode!
|
|
52
|
-
message: String!
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
enum PasswordAuthErrorCode {
|
|
56
|
-
FAILURE
|
|
57
|
-
IDENTITY_NOT_FOUND
|
|
58
|
-
SECRET_NOT_SET
|
|
59
|
-
MULTIPLE_IDENTITY_MATCHES
|
|
60
|
-
SECRET_MISMATCH
|
|
61
|
-
}
|
|
62
|
-
|
|
63
4
|
type User {
|
|
64
5
|
id: ID!
|
|
65
6
|
name: String
|
|
@@ -88,7 +29,9 @@ input UserWhereInput {
|
|
|
88
29
|
OR: [UserWhereInput!]
|
|
89
30
|
NOT: [UserWhereInput!]
|
|
90
31
|
id: IDFilter
|
|
91
|
-
|
|
32
|
+
name: StringFilter
|
|
33
|
+
email: StringFilter
|
|
34
|
+
posts: PostManyRelationFilter
|
|
92
35
|
}
|
|
93
36
|
|
|
94
37
|
input IDFilter {
|
|
@@ -102,7 +45,7 @@ input IDFilter {
|
|
|
102
45
|
not: IDFilter
|
|
103
46
|
}
|
|
104
47
|
|
|
105
|
-
input
|
|
48
|
+
input StringFilter {
|
|
106
49
|
equals: String
|
|
107
50
|
in: [String!]
|
|
108
51
|
notIn: [String!]
|
|
@@ -113,10 +56,10 @@ input StringNullableFilter {
|
|
|
113
56
|
contains: String
|
|
114
57
|
startsWith: String
|
|
115
58
|
endsWith: String
|
|
116
|
-
not:
|
|
59
|
+
not: NestedStringFilter
|
|
117
60
|
}
|
|
118
61
|
|
|
119
|
-
input
|
|
62
|
+
input NestedStringFilter {
|
|
120
63
|
equals: String
|
|
121
64
|
in: [String!]
|
|
122
65
|
notIn: [String!]
|
|
@@ -127,11 +70,19 @@ input NestedStringNullableFilter {
|
|
|
127
70
|
contains: String
|
|
128
71
|
startsWith: String
|
|
129
72
|
endsWith: String
|
|
130
|
-
not:
|
|
73
|
+
not: NestedStringFilter
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
input PostManyRelationFilter {
|
|
77
|
+
every: PostWhereInput
|
|
78
|
+
some: PostWhereInput
|
|
79
|
+
none: PostWhereInput
|
|
131
80
|
}
|
|
132
81
|
|
|
133
82
|
input UserOrderByInput {
|
|
134
83
|
id: OrderDirection
|
|
84
|
+
name: OrderDirection
|
|
85
|
+
email: OrderDirection
|
|
135
86
|
}
|
|
136
87
|
|
|
137
88
|
enum OrderDirection {
|
|
@@ -174,8 +125,8 @@ type Post {
|
|
|
174
125
|
id: ID!
|
|
175
126
|
title: String
|
|
176
127
|
status: String
|
|
177
|
-
content:
|
|
178
|
-
publishDate:
|
|
128
|
+
content: Post_content_Document
|
|
129
|
+
publishDate: DateTime
|
|
179
130
|
author: User
|
|
180
131
|
tags(
|
|
181
132
|
where: TagWhereInput! = {}
|
|
@@ -186,10 +137,13 @@ type Post {
|
|
|
186
137
|
tagsCount(where: TagWhereInput! = {}): Int
|
|
187
138
|
}
|
|
188
139
|
|
|
189
|
-
type
|
|
140
|
+
type Post_content_Document {
|
|
190
141
|
document(hydrateRelationships: Boolean! = false): JSON!
|
|
191
142
|
}
|
|
192
143
|
|
|
144
|
+
scalar DateTime
|
|
145
|
+
@specifiedBy(url: "https://datatracker.ietf.org/doc/html/rfc3339#section-5.6")
|
|
146
|
+
|
|
193
147
|
input PostWhereUniqueInput {
|
|
194
148
|
id: ID
|
|
195
149
|
}
|
|
@@ -199,17 +153,70 @@ input PostWhereInput {
|
|
|
199
153
|
OR: [PostWhereInput!]
|
|
200
154
|
NOT: [PostWhereInput!]
|
|
201
155
|
id: IDFilter
|
|
156
|
+
title: StringFilter
|
|
157
|
+
status: StringNullableFilter
|
|
158
|
+
publishDate: DateTimeNullableFilter
|
|
159
|
+
author: UserWhereInput
|
|
160
|
+
tags: TagManyRelationFilter
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
input StringNullableFilter {
|
|
164
|
+
equals: String
|
|
165
|
+
in: [String!]
|
|
166
|
+
notIn: [String!]
|
|
167
|
+
lt: String
|
|
168
|
+
lte: String
|
|
169
|
+
gt: String
|
|
170
|
+
gte: String
|
|
171
|
+
contains: String
|
|
172
|
+
startsWith: String
|
|
173
|
+
endsWith: String
|
|
174
|
+
not: NestedStringNullableFilter
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
input NestedStringNullableFilter {
|
|
178
|
+
equals: String
|
|
179
|
+
in: [String!]
|
|
180
|
+
notIn: [String!]
|
|
181
|
+
lt: String
|
|
182
|
+
lte: String
|
|
183
|
+
gt: String
|
|
184
|
+
gte: String
|
|
185
|
+
contains: String
|
|
186
|
+
startsWith: String
|
|
187
|
+
endsWith: String
|
|
188
|
+
not: NestedStringNullableFilter
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
input DateTimeNullableFilter {
|
|
192
|
+
equals: DateTime
|
|
193
|
+
in: [DateTime!]
|
|
194
|
+
notIn: [DateTime!]
|
|
195
|
+
lt: DateTime
|
|
196
|
+
lte: DateTime
|
|
197
|
+
gt: DateTime
|
|
198
|
+
gte: DateTime
|
|
199
|
+
not: DateTimeNullableFilter
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
input TagManyRelationFilter {
|
|
203
|
+
every: TagWhereInput
|
|
204
|
+
some: TagWhereInput
|
|
205
|
+
none: TagWhereInput
|
|
202
206
|
}
|
|
203
207
|
|
|
204
208
|
input PostOrderByInput {
|
|
205
209
|
id: OrderDirection
|
|
210
|
+
title: OrderDirection
|
|
211
|
+
status: OrderDirection
|
|
212
|
+
publishDate: OrderDirection
|
|
206
213
|
}
|
|
207
214
|
|
|
208
215
|
input PostUpdateInput {
|
|
209
216
|
title: String
|
|
210
217
|
status: String
|
|
211
218
|
content: JSON
|
|
212
|
-
publishDate:
|
|
219
|
+
publishDate: DateTime
|
|
213
220
|
author: UserRelateToOneForUpdateInput
|
|
214
221
|
tags: TagRelateToManyForUpdateInput
|
|
215
222
|
}
|
|
@@ -236,7 +243,7 @@ input PostCreateInput {
|
|
|
236
243
|
title: String
|
|
237
244
|
status: String
|
|
238
245
|
content: JSON
|
|
239
|
-
publishDate:
|
|
246
|
+
publishDate: DateTime
|
|
240
247
|
author: UserRelateToOneForCreateInput
|
|
241
248
|
tags: TagRelateToManyForCreateInput
|
|
242
249
|
}
|
|
@@ -272,10 +279,13 @@ input TagWhereInput {
|
|
|
272
279
|
OR: [TagWhereInput!]
|
|
273
280
|
NOT: [TagWhereInput!]
|
|
274
281
|
id: IDFilter
|
|
282
|
+
name: StringFilter
|
|
283
|
+
posts: PostManyRelationFilter
|
|
275
284
|
}
|
|
276
285
|
|
|
277
286
|
input TagOrderByInput {
|
|
278
287
|
id: OrderDirection
|
|
288
|
+
name: OrderDirection
|
|
279
289
|
}
|
|
280
290
|
|
|
281
291
|
input TagUpdateInput {
|
|
@@ -301,8 +311,55 @@ scalar JSON
|
|
|
301
311
|
url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf"
|
|
302
312
|
)
|
|
303
313
|
|
|
314
|
+
type Mutation {
|
|
315
|
+
createUser(data: UserCreateInput!): User
|
|
316
|
+
createUsers(data: [UserCreateInput!]!): [User]
|
|
317
|
+
updateUser(where: UserWhereUniqueInput!, data: UserUpdateInput!): User
|
|
318
|
+
updateUsers(data: [UserUpdateArgs!]!): [User]
|
|
319
|
+
deleteUser(where: UserWhereUniqueInput!): User
|
|
320
|
+
deleteUsers(where: [UserWhereUniqueInput!]!): [User]
|
|
321
|
+
createPost(data: PostCreateInput!): Post
|
|
322
|
+
createPosts(data: [PostCreateInput!]!): [Post]
|
|
323
|
+
updatePost(where: PostWhereUniqueInput!, data: PostUpdateInput!): Post
|
|
324
|
+
updatePosts(data: [PostUpdateArgs!]!): [Post]
|
|
325
|
+
deletePost(where: PostWhereUniqueInput!): Post
|
|
326
|
+
deletePosts(where: [PostWhereUniqueInput!]!): [Post]
|
|
327
|
+
createTag(data: TagCreateInput!): Tag
|
|
328
|
+
createTags(data: [TagCreateInput!]!): [Tag]
|
|
329
|
+
updateTag(where: TagWhereUniqueInput!, data: TagUpdateInput!): Tag
|
|
330
|
+
updateTags(data: [TagUpdateArgs!]!): [Tag]
|
|
331
|
+
deleteTag(where: TagWhereUniqueInput!): Tag
|
|
332
|
+
deleteTags(where: [TagWhereUniqueInput!]!): [Tag]
|
|
333
|
+
endSession: Boolean!
|
|
334
|
+
authenticateUserWithPassword(
|
|
335
|
+
email: String!
|
|
336
|
+
password: String!
|
|
337
|
+
): UserAuthenticationWithPasswordResult
|
|
338
|
+
createInitialUser(
|
|
339
|
+
data: CreateInitialUserInput!
|
|
340
|
+
): UserAuthenticationWithPasswordSuccess!
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
union UserAuthenticationWithPasswordResult =
|
|
344
|
+
UserAuthenticationWithPasswordSuccess
|
|
345
|
+
| UserAuthenticationWithPasswordFailure
|
|
346
|
+
|
|
347
|
+
type UserAuthenticationWithPasswordSuccess {
|
|
348
|
+
sessionToken: String!
|
|
349
|
+
item: User!
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
type UserAuthenticationWithPasswordFailure {
|
|
353
|
+
message: String!
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
input CreateInitialUserInput {
|
|
357
|
+
name: String
|
|
358
|
+
email: String
|
|
359
|
+
password: String
|
|
360
|
+
}
|
|
361
|
+
|
|
304
362
|
type Query {
|
|
305
|
-
authenticatedItem: AuthenticatedItem
|
|
306
363
|
users(
|
|
307
364
|
where: UserWhereInput! = {}
|
|
308
365
|
orderBy: [UserOrderByInput!]! = []
|
|
@@ -328,8 +385,11 @@ type Query {
|
|
|
328
385
|
tag(where: TagWhereUniqueInput!): Tag
|
|
329
386
|
tagsCount(where: TagWhereInput! = {}): Int
|
|
330
387
|
keystone: KeystoneMeta!
|
|
388
|
+
authenticatedItem: AuthenticatedItem
|
|
331
389
|
}
|
|
332
390
|
|
|
391
|
+
union AuthenticatedItem = User
|
|
392
|
+
|
|
333
393
|
type KeystoneMeta {
|
|
334
394
|
adminMeta: KeystoneAdminMeta!
|
|
335
395
|
}
|
|
@@ -370,7 +430,7 @@ type KeystoneAdminUIFieldMeta {
|
|
|
370
430
|
customViewsIndex: Int
|
|
371
431
|
createView: KeystoneAdminUIFieldMetaCreateView!
|
|
372
432
|
listView: KeystoneAdminUIFieldMetaListView!
|
|
373
|
-
itemView(id: ID
|
|
433
|
+
itemView(id: ID): KeystoneAdminUIFieldMetaItemView
|
|
374
434
|
search: QueryMode
|
|
375
435
|
}
|
|
376
436
|
|
|
@@ -393,7 +453,7 @@ enum KeystoneAdminUIFieldMetaListViewFieldMode {
|
|
|
393
453
|
}
|
|
394
454
|
|
|
395
455
|
type KeystoneAdminUIFieldMetaItemView {
|
|
396
|
-
fieldMode: KeystoneAdminUIFieldMetaItemViewFieldMode
|
|
456
|
+
fieldMode: KeystoneAdminUIFieldMetaItemViewFieldMode
|
|
397
457
|
}
|
|
398
458
|
|
|
399
459
|
enum KeystoneAdminUIFieldMetaItemViewFieldMode {
|