-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove queryLimits.maxResults, add maximumTake #7963
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b778bd6
remove queryLimits.maxResults
dcousens 4aed09a
add changeset
dcousens 6cb084e
add example
dcousens 9263cc9
add non-nullable take
dcousens beb43fd
adds changeset
dcousens 8eb386d
update documentation
dcousens 42acf3a
fixes documentation typo
dcousens 85f10ab
less ?
dcousens e3aa8d0
s/maximumTake/maxTake
dcousens d86114a
add lower of default for pageSize
dcousens d476534
fix non-deterministic test comparison
dcousens 70bc49f
add documentation conditionals
dcousens 7bba6e9
prettier ignore docs for now
dcousens 722b57e
prefer shorter link
dcousens 71141d1
fix relationship select not using pageSize
dcousens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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': major | ||
--- | ||
|
||
Removes `context.totalResults` and `context.maxTotalResults` |
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 `[list].graphql.maxTake`, a list configuration option to enforce the maximum `take` value in findMany queries for that list |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## Base Project - Limits | ||
|
||
This project demonstrates usage of different limits you can add to your GraphQL schema in Keystone. | ||
|
||
## Instructions | ||
|
||
To run this project, clone the Keystone repository locally, run `yarn` at the root of this repository, then navigate to this directory and run: | ||
|
||
```shell | ||
yarn dev | ||
``` | ||
|
||
This will start the Admin UI at [localhost:3000](http://localhost:3000). | ||
You can use the Admin UI to create items in your database. | ||
|
||
You can also access a GraphQL Playground at [localhost:3000/api/graphql](http://localhost:3000/api/graphql), which allows you to directly run GraphQL queries and mutations. | ||
|
||
Congratulations, you're now up and running with Keystone! 🚀 | ||
|
||
### Optional: add sample data | ||
|
||
This example includes sample data. To add it to your database: | ||
|
||
1. Ensure you’ve initialised your project with `yarn dev` at least once. | ||
2. Run `yarn seed-data`. This will populate your database with sample content. | ||
3. Run `yarn dev` again to startup Admin UI with sample data in place. | ||
|
||
## Try it out in CodeSandbox 🧪 | ||
|
||
You can play with this example online in a web browser using the free [codesandbox.io](https://codesandbox.io/) service. To launch this example, open the URL <https://githubbox.com/keystonejs/keystone/tree/main/examples/blog>. You can also fork this sandbox to make your own changes. | ||
|
||
## Next steps | ||
|
||
Experiment with the code in this example to see how Keystone works, familiarise yourself with the Admin UI, and learn about the GraphQL Playground. | ||
|
||
When you’ve got the hang of this base project, try a [feature project](../) to learn Keystone’s advanced features and take your knowledge to the next level. |
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,10 @@ | ||
import { config } from '@keystone-6/core'; | ||
import { lists } from './schema'; | ||
|
||
export default config({ | ||
db: { | ||
provider: 'sqlite', | ||
url: process.env.DATABASE_URL || 'file:./keystone-example.db', | ||
}, | ||
lists, | ||
}); |
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,20 @@ | ||
{ | ||
"name": "@keystone-6/example-limits", | ||
"version": "0.0.1", | ||
"private": true, | ||
"license": "MIT", | ||
"scripts": { | ||
"dev": "keystone dev", | ||
"start": "keystone start", | ||
"build": "keystone build", | ||
"seed-data": "tsx seed-data.ts" | ||
}, | ||
"dependencies": { | ||
"@keystone-6/core": "^2.2.0" | ||
}, | ||
"devDependencies": { | ||
"tsx": "^3.9.0", | ||
"typescript": "~4.7.4" | ||
}, | ||
"repository": "https://github.com/keystonejs/keystone/tree/main/examples/limits" | ||
} |
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,7 @@ | ||
{ | ||
"template": "node", | ||
"container": { | ||
"startScript": "keystone dev", | ||
"node": "14" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was removed many moons ago