Skip to content
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

Auto generate mutation and query code sample #41

Merged

Conversation

cliftonmcintosh
Copy link
Contributor

@cliftonmcintosh cliftonmcintosh commented Jun 2, 2024

This updates document generation to include a code block sample for queries and mutations. The code block is included in the section that describes a query or mutation.

The arguments and their types are provided, and a sample of the fields returned is also provided. The sample includes only the first level of fields returned. If any of the fields are objects, then their constituent fields are not shown. This is to prevent needing to traverse arbitrary levels of fields.

Here is an example

mutation RefreshIdToken($refreshToken: String!) {
  refreshIdToken(refreshToken: $refreshToken) {
    idToken
    userSsoDetails {
    }
  }
}

Within a section for that mutation, it would look like this:

Screenshot 2024-06-23 at 4 17 46 PM

What's missing

  • This does not provide sample arguments for an operation.
  • It also does not provide samples for union return types.

@cliftonmcintosh cliftonmcintosh force-pushed the cmcintosh/auto-generate-schema-sample branch from e4bba2a to 4b58b32 Compare June 2, 2024 20:42
@cliftonmcintosh cliftonmcintosh force-pushed the cmcintosh/auto-generate-schema-sample branch 3 times, most recently from 99786a0 to a42b7d6 Compare June 17, 2024 20:52
@cliftonmcintosh cliftonmcintosh force-pushed the cmcintosh/auto-generate-schema-sample branch from 28ecc49 to 66f0e3e Compare June 23, 2024 20:46
@cliftonmcintosh cliftonmcintosh force-pushed the cmcintosh/auto-generate-schema-sample branch from ccef763 to 4296350 Compare June 23, 2024 21:07
@cliftonmcintosh cliftonmcintosh marked this pull request as ready for review June 23, 2024 21:19
@cliftonmcintosh cliftonmcintosh requested a review from a team as a code owner June 23, 2024 21:19
@cliftonmcintosh cliftonmcintosh changed the title Auto generate schema sample Auto generate mutation and query code sample Jun 24, 2024
@epinault
Copy link
Contributor

can you remove the 1.14 and older from CI? the format is different and really I don t care to support them in CI at this point here

Copy link
Contributor

@epinault epinault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@epinault epinault merged commit 1199a7c into podium:master Jun 24, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants