-
Notifications
You must be signed in to change notification settings - Fork 251
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
fix(amplify_api): model helpers query predicates correctly translates… #1417
Merged
ragingsquirrel3
merged 4 commits into
aws-amplify:main
from
ragingsquirrel3:fix-api-helpers-query-associated-id
Mar 1, 2022
Merged
fix(amplify_api): model helpers query predicates correctly translates… #1417
ragingsquirrel3
merged 4 commits into
aws-amplify:main
from
ragingsquirrel3:fix-api-helpers-query-associated-id
Mar 1, 2022
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
… query by associated id
Codecov Report
@@ Coverage Diff @@
## main #1417 +/- ##
=======================================
Coverage 54.24% 54.24%
=======================================
Files 264 264
Lines 12000 12001 +1
=======================================
+ Hits 6509 6510 +1
Misses 5491 5491
Flags with carried forward coverage won't be shown. Click here to find out more.
|
haverchuck
approved these changes
Mar 1, 2022
dnys1
approved these changes
Mar 1, 2022
packages/amplify_api/lib/src/graphql/graphql_request_factory.dart
Outdated
Show resolved
Hide resolved
HuiSF
added a commit
that referenced
this pull request
Mar 11, 2022
* chore: Update issue template to GH form (#1387) * chore: Update issue template to GH form * Add N/A for placeholders * Minor updates * Minor fixes * fix(amplify_authenticator): remove use of onInverseSurface to support older flutter versions (#1385) * remove use of onInverseSurface * set min flutter version to 2.0.0 * update fallback color * chore(amplify_authenticator): run unit tests for amplify_authenticator in CI (#1389) * fix(core): Implement Result in AtomicResult (#1393) * fix(core): Implement Result in AtomicResult * Fix AtomicResultTest * chore: Small QOS additions to bug report template (#1394) * fix(amplify_authenticator): allow multiple custom attributes in custom forms (#1377) * add initial category for ui customization * remove AuthState from the public API * remove auth bloc from public api * clean up public api, add docs * update for consistency, fix typos * change category name, fix typo * update install docs * update package description * update example project dir * uncomment example app imports * update template names * empty commit to trigger CI * update how runtime and custom fields are handled * move runtime fields to SignUpForm * fix signout button * Apply suggestions from code review Co-authored-by: Dillon Nys <24740863+dnys1@users.noreply.github.com> * rename includeDefaultFields, update sort * Update packages/amplify_authenticator/lib/src/widgets/form.dart Co-authored-by: Dillon Nys <24740863+dnys1@users.noreply.github.com> * make _includeDefaultFields private Co-authored-by: Dillon Nys <24740863+dnys1@users.noreply.github.com> * chore: authenticator v0.1.0 (#1402) * chore: authenticator v0.1.0 * Update packages/amplify_authenticator/pubspec.yaml Co-authored-by: Dillon Nys <24740863+dnys1@users.noreply.github.com> Co-authored-by: Dillon Nys <24740863+dnys1@users.noreply.github.com> * chore: adds API for auth integ tests + minor fixes (#1302) * chore(amplify_authenticator): add more detail to api docs for username (#1403) * add more detail to api docs for username * move docs to SignUpFormField * fix overflow in custom loyout example (#1401) * chore: rename docs dir to doc (#1406) * chore(amplify_api): clean up some code to limit analysis infos (#1404) * fix(datastore): delete default predicate causes deletion failure (#1409) * fix(datastore): delete default predicate causes deletion failure * fix save integration test * Release 4.0.1 version bump (#1418) * Version bump * fix changelog 0.4.0 entry * Add PR #s * chore: add pub analysis to CI (#1408) * add pana to ci * add missing colon * add install_melos step * move scope arg * move exec command to config * remove pana from melos * add remaining packages * address issue in authenticator package * disable failing packages * revert change to melos.yaml * add threshold * add quotes * escape quotes * escape << >> * escape <<< * update variable parsing * update parsing * remove trailing quote * add remaining packages * update variable name, add desc * adjust thresholds * decrease api threshold * chore: remove obsolete integration test driver files (#1395) * fix(amplify_api): model helpers query predicates correctly translates… (#1417) * chore(amplify_auth_cognito) federated plugin (#1349) * chore(auth): fix pubspec urls (#1424) Co-authored-by: Dillon Nys <24740863+dnys1@users.noreply.github.com> Co-authored-by: Jordan Nelson <nejrd@amazon.com> Co-authored-by: Travis Sheppard <tshepp@amazon.com> Co-authored-by: Jordan Nelson <Jordan.Ryan.Nelson@gmail.com> Co-authored-by: Dustin Noyes <dustin.noyes.dev@gmail.com> Co-authored-by: Kyle <kylcheng@gmail.com>
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.
Issue #1419
API model helper
ModelQueries.list()
accepts a query parameter argumentwhere
and translates it to a GraphQL filter according to the model's schema. Right now, it does not correctly handle when querying a list of models by a belongsTo ID. It uses the keyfield
value of the query predicate, which is not correct in this case.This PR has a small fix that looks for associations when getting that field name, and looks for the schema's
targetName
, which is the name of the field that AppSync uses from the compiled schema. This is not present for all query predicates, only when querying associations. This PR has the fix, plus unit test and integ test.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.