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

Fix List input coercion rules #1004

Merged
merged 37 commits into from
Dec 16, 2021
Merged

Fix List input coercion rules #1004

merged 37 commits into from
Dec 16, 2021

Conversation

ilslv
Copy link
Member

@ilslv ilslv commented Dec 14, 2021

Synopsis

For now, [Int]! and [Int!]! can accept Null which contradicts GraphQL Spec.

Solution

Forbid coercing nulls into non-null lists, while allowing for now coercing [1, 2, 3] into [[Int]] (resulting in [[1], [2], [3]]), because this may be an ambiguity error: graphql/graphql-spec#515

Checklist

  • Created PR:
    • In draft mode
    • Name contains Draft: prefix
    • Name contains issue reference
    • Has assignee
  • Documentation is updated (if required)
  • Tests are updated (if required)
  • Changes conform code style
  • CHANGELOG entry is added (if required)
  • FCM (final commit message) is posted
    • and approved
  • Review is completed and changes are approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • Draft: prefix is removed
    • All temporary labels are removed

tyranron and others added 30 commits October 15, 2021 13:05
# Conflicts:
#	juniper/src/ast.rs
#	juniper_actix/src/lib.rs
…nput-value-resolve-errors

# Conflicts:
#	juniper/CHANGELOG.md
# Conflicts:
#	integration_tests/juniper_tests/src/issue_372.rs
#	juniper/CHANGELOG.md
#	juniper/src/validation/rules/fields_on_correct_type.rs
#	juniper_actix/src/lib.rs
@ilslv ilslv self-assigned this Dec 14, 2021
@ilslv ilslv added semver::breaking Breaking change in terms of SemVer bug Something isn't working enhancement Improvement of existing features or bugfix labels Dec 14, 2021
# Conflicts:
#	docs/book/content/types/scalars.md
#	integration_tests/async_await/src/main.rs
#	integration_tests/juniper_tests/src/codegen/impl_scalar.rs
#	integration_tests/juniper_tests/src/custom_scalar.rs
#	juniper/CHANGELOG.md
#	juniper/src/executor_tests/introspection/input_object.rs
#	juniper/src/executor_tests/variables.rs
#	juniper/src/macros/helper/mod.rs
#	juniper/src/types/containers.rs
#	juniper/src/validation/input_value.rs
#	juniper/src/validation/test_harness.rs
#	juniper_codegen/src/common/field/arg.rs
#	juniper_codegen/src/common/field/mod.rs
#	juniper_codegen/src/graphql_interface/mod.rs
#	juniper_codegen/src/graphql_object/mod.rs
#	juniper_codegen/src/graphql_subscription/mod.rs
#	juniper_codegen/src/graphql_union/mod.rs
#	juniper_codegen/src/impl_scalar.rs
#	juniper_codegen/src/lib.rs
#	juniper_codegen/src/util/mod.rs
@ilslv
Copy link
Member Author

ilslv commented Dec 15, 2021

FCM

Fix `List` input coercion rules (#1004)

Additionally:
- fix WASM builds after 2.1 version of `bson`

@ilslv
Copy link
Member Author

ilslv commented Dec 15, 2021

wasm builds are broken now because of the bson 2.1.0 version

@ilslv ilslv changed the title Draft: Fix List input coercion rules Fix List input coercion rules Dec 16, 2021
@ilslv ilslv marked this pull request as ready for review December 16, 2021 05:53
@ilslv ilslv requested a review from tyranron December 16, 2021 05:53
Copy link
Member

@tyranron tyranron left a comment

Choose a reason for hiding this comment

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

@ilslv 👍

@tyranron tyranron merged commit 265d4c5 into master Dec 16, 2021
@tyranron tyranron deleted the fix-list-coercion branch December 16, 2021 10:36
@tyranron tyranron added this to the 0.16.0 milestone Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Improvement of existing features or bugfix semver::breaking Breaking change in terms of SemVer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants