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

feat: modify Client API to place variables in last positional argument. #226

Merged
merged 1 commit into from
Nov 9, 2020

Conversation

parkerziegler
Copy link
Contributor

This PR does a few things:

  1. Updates our Client APIs:
  • The ~request labeled argument is renamed to ~query, ~mutation, or ~subscription depending on the method in use.
  • variables are passed as records in the last position, if required. If the query, mutation, or subscription uses no variables, unit is passed in the last position.
  1. Updates our documentation to reflect the urql peerDependency introduced in Make urql a peerDependency. Update examples to use pure CSS. #224
  2. Updates our Client documentation to match the latest API changes.
  3. Updates our binding to rename operationName to kind per this PR in urql upstream.

Alongside #225 we're getting very close to a usable v3! Moving slowly here but hoping to keep plugging away at everything while I also balance grad school apps this weekend 🤦

Copy link

@kitten kitten left a comment

Choose a reason for hiding this comment

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

Nice! I didn't think we'd get to parity this quickly. I really enjoy the variables change since it makes natural since. It hasn't been that popular in reason to put an unlabelled required argument last but I've hoped for a long time it'd become more favoured as it's very natural 👏

@parkerziegler parkerziegler force-pushed the feature/modify-client-api branch from e53982c to 5019446 Compare November 9, 2020 02:14
@parkerziegler parkerziegler merged commit 279ff0d into v3 Nov 9, 2020
@parkerziegler parkerziegler deleted the feature/modify-client-api branch November 9, 2020 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants