Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Add params tables for GraphQL and Rest Client docs.#123

Merged
thecodepixi merged 5 commits intomainfrom
documenation-improvements
Mar 8, 2021
Merged

Add params tables for GraphQL and Rest Client docs.#123
thecodepixi merged 5 commits intomainfrom
documenation-improvements

Conversation

@thecodepixi
Copy link
Copy Markdown
Contributor

@thecodepixi thecodepixi commented Mar 4, 2021

WHY are these changes introduced?

Partially fixes 121

Strikethru the above to keep docs issue open, but this does partially resolve some of the needed docs enhancement outlined in that issue.

WHAT is this pull request doing?

Adds the necessary tables to explain the available params and arguments for the GraphQL and Rest clients, as well as general improvements to the usage examples.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
    - [ ] Minor: New feature (non-breaking change which adds functionality)
    - [ ] Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
    - [ ] I have added/updated tests for this change
    - [ ] I have documented new APIs/updated the documentation for modified APIs (for public APIs)

Comment thread docs/usage/rest.md Outdated
@thecodepixi thecodepixi requested review from gfscott and paulomarg March 4, 2021 20:26
Copy link
Copy Markdown
Contributor

@gfscott gfscott left a comment

Choose a reason for hiding this comment

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

👍🏻 Looking good! Couple little notes and considerations

Comment thread docs/usage/graphql.md Outdated

The `GraphQLClient`'s main method is `query`, which accepts a `GraphQLParams` object as its argument. `GraphQLParams` only requires the `data` parameter, but also optionally accepts `query`, `extraHeaders`, and `tries`:

| Parameter | Type | Notes | Required? | Default Value |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think a good rule is to always put the "Notes" column last, since it's often the largest chunk and in some contexts might push more critical information (like "Required?") out of the user's view

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree. Also, I'm always torn between having a required? column or having the parameters as data / query?

Copy link
Copy Markdown
Contributor Author

@thecodepixi thecodepixi Mar 5, 2021

Choose a reason for hiding this comment

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

@gfscott Oh that's a really good point, thank you! I'll shift that over.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@paulomarg Yeah I feel the same way. Is it obvious enough to just end the param name in a ? to mark it as optional? So few of the params are required it feels like a waste of table space. I actually feel the same way about the Default Value column, but want to communicate the default for tries in an obvious way.

Comment thread docs/usage/graphql.md Outdated
Comment thread docs/usage/graphql.md
Comment thread docs/usage/rest.md Outdated
Comment thread docs/usage/rest.md Outdated
Copy link
Copy Markdown
Contributor

@paulomarg paulomarg left a comment

Choose a reason for hiding this comment

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

This is great!!!

Comment thread docs/usage/graphql.md Outdated

The `GraphQLClient`'s main method is `query`, which accepts a `GraphQLParams` object as its argument. `GraphQLParams` only requires the `data` parameter, but also optionally accepts `query`, `extraHeaders`, and `tries`:

| Parameter | Type | Notes | Required? | Default Value |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree. Also, I'm always torn between having a required? column or having the parameters as data / query?

Comment thread docs/usage/rest.md
Comment thread docs/usage/rest.md
@thecodepixi thecodepixi requested a review from paulomarg March 8, 2021 19:23
@thecodepixi thecodepixi changed the title [WIP] Adds params tables for GraphQL and Rest Client docs. Add params tables for GraphQL and Rest Client docs. Mar 8, 2021
@thecodepixi thecodepixi marked this pull request as ready for review March 8, 2021 19:28
@thecodepixi thecodepixi requested a review from a team as a code owner March 8, 2021 19:28
Comment thread docs/usage/rest.md Outdated
Comment thread docs/usage/rest.md Outdated
Copy link
Copy Markdown
Contributor

@paulomarg paulomarg left a comment

Choose a reason for hiding this comment

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

LGTM

@thecodepixi thecodepixi force-pushed the documenation-improvements branch from c771fe5 to 96c3079 Compare March 8, 2021 21:35
@thecodepixi thecodepixi merged commit fe5ed54 into main Mar 8, 2021
@thecodepixi thecodepixi deleted the documenation-improvements branch March 8, 2021 21:39
@paulomarg paulomarg temporarily deployed to production March 16, 2021 17:41 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants