-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
babel plugin: support input object literals #894
Closed
josephsavona
wants to merge
1
commit into
facebook:master
from
josephsavona:plugin-input-object-literals
Closed
babel plugin: support input object literals #894
josephsavona
wants to merge
1
commit into
facebook:master
from
josephsavona:plugin-input-object-literals
Conversation
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
cc @iamchenxin |
@facebook-github-bot import |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
This was referenced Mar 2, 2016
ghost
closed this
in
Mar 3, 2016
0285a1e
ghost
pushed a commit
that referenced
this pull request
Mar 3, 2016
Summary:Note: this is inspired by and partially based on iamchenxin's work in #767 and #844. Thanks for the head start! Relay currently assumes that identifying argument values are strings (numbers *sort* of work, but not really). This builds on #894 (which added support to the plugin for parsing/printing literal InputObjects) by allowing identifying arguments to be basically anything - boolean, number, string, or array/object of the the same. Key changes include: - Change the `CallValue` type from mixed to an explicit list of the supported types - Change `forEachRootCallArg` to return both the literal JS value of the argument as well as a serialized key - Change all callers of `forEachRootCallArg` (and some places that manually inspected the identifying arg) to correctly choose between the identifying argument value (i.e. when constructing a query with it) or the identifying argument key (for use with `RelayRecordStore.{putDataID,getDataID}`). - Added tests that the writer correctly creates root records with numeric/object identifying argument values. Closes #895 Reviewed By: yungsters Differential Revision: D3003201 Pulled By: josephsavona fb-gh-sync-id: 43ffbbd37e8d2bd8c0abe2cb792ad8959efb7a42 shipit-source-id: 43ffbbd37e8d2bd8c0abe2cb792ad8959efb7a42
4 tasks
venepe
pushed a commit
to venepe/relay
that referenced
this pull request
Mar 7, 2016
Summary:This is an expanded portion of just the plugin changes from [facebook#844](facebook#844). The goal of that PR is to support arbitrary values in identifying arguments. Part of that means supporting input objects, which we didn't fully support in the plugin (we only allowed the value of an input object argument to be a variable, not a literal). Changes: - Support parsing and printing literal InputObject expressions. - Clear error message when variables appear nested in ways that the Relay runtime cannot interpret. - Tests for the above. Closes facebook#894 Reviewed By: yungsters Differential Revision: D3002163 Pulled By: josephsavona fb-gh-sync-id: d7708b36bc087bdd744c4d027cf4b888e8350798 shipit-source-id: d7708b36bc087bdd744c4d027cf4b888e8350798
venepe
pushed a commit
to venepe/relay
that referenced
this pull request
Mar 7, 2016
Summary:Note: this is inspired by and partially based on iamchenxin's work in facebook#767 and facebook#844. Thanks for the head start! Relay currently assumes that identifying argument values are strings (numbers *sort* of work, but not really). This builds on facebook#894 (which added support to the plugin for parsing/printing literal InputObjects) by allowing identifying arguments to be basically anything - boolean, number, string, or array/object of the the same. Key changes include: - Change the `CallValue` type from mixed to an explicit list of the supported types - Change `forEachRootCallArg` to return both the literal JS value of the argument as well as a serialized key - Change all callers of `forEachRootCallArg` (and some places that manually inspected the identifying arg) to correctly choose between the identifying argument value (i.e. when constructing a query with it) or the identifying argument key (for use with `RelayRecordStore.{putDataID,getDataID}`). - Added tests that the writer correctly creates root records with numeric/object identifying argument values. Closes facebook#895 Reviewed By: yungsters Differential Revision: D3003201 Pulled By: josephsavona fb-gh-sync-id: 43ffbbd37e8d2bd8c0abe2cb792ad8959efb7a42 shipit-source-id: 43ffbbd37e8d2bd8c0abe2cb792ad8959efb7a42
Closed
Asaway
reviewed
Mar 8, 2023
@@ -34,7 +34,7 @@ var q = (function () { | |||
metadata: { | |||
isPlural: true, | |||
identifyingArgName: 'query', | |||
identifyingArgType: '[SearchInput!]' |
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.
scripts/babel-relay-plugin/src/tests/testschema.rfc.json
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is an expanded portion of just the plugin changes from #844. Changes: