-
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
Add API docs for the list items API #5518
Conversation
🦋 Changeset detectedLatest commit: b4574b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/4H8dC44juawSqwsdoQDciG3WKHaz |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b4574b5:
|
73be4c4
to
ba014e4
Compare
ba014e4
to
9a30072
Compare
9a30072
to
0b0cda2
Compare
0b0cda2
to
b11d15a
Compare
41277da
to
66285f4
Compare
66285f4
to
fb18f36
Compare
fb18f36
to
3662f91
Compare
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.
Great start @timleslie 👏
Not required for this PR (good to publish this immediately imo) but a couple of next steps stood out when I was reading:
- You're demo'ing the API for relationship creation, I don't think we've actually documented this anywhere else and it's a bit like "oh wait, what's that doing? how do I learn more? what else can I do?" and it would be good to add a link out when there's more docs for that
- For the create/update mutation APIs, would be nice to add some explanation for what the data argument actually is; this subtly doesn't match the output types people may expect, again I think the API reference for this is missing though and people will probably wonder about that here, it's a bit mysterious
- We're not explaining anything about how permissions (/ session) interact here. That's kind of covered in the context API docs, but would probably be good to remind readers about here because it's usually going to be related and important to think about when using this API
Yep, that's on my hit list 👍
We have rudimentary API docs for the GraphQL operations here: https://next.keystonejs.com/apis/graphql#create-user I might go ahead and link do these docs.
Yep, will loop back on that once those guides and APIs are more fleshed out 👍 |
3662f91
to
b4574b5
Compare
Adds docs for the lists item API. Preview here: https://keystone-next-docs-git-items-api-docs-keystonejs.vercel.app/apis/list-items
Updates the
findMany()
andcount()
functions to have a default arg of{}
so that.count()
and.findMany()
work as expected when no argument is provided.Updates an arbitrary handful of server-side-graphql-client calls in the tests to use the list items API to verify that the documents can be followed successfully. This is the first set of changes for #5485.
Does not document the DB items API, that will be done separately.