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

Remove 1:1* connections, relax constraints of 1:1 ones #178

Merged
merged 2 commits into from
Jun 20, 2018

Conversation

Totktonada
Copy link
Member

@Totktonada Totktonada commented Jun 20, 2018

Fixes #135.

Changes in 1:1 connection behaviour:

* The case when all connection parts are null is allowed (gives null
  child object instead of an error).
* The case when no child object were matched is allowed.
  - FULL MATCH contraint does not verified entirely (further work is
    needed).
  - The following bug was fixed: usage of filtering arguments now cannot
    trigger 'expect one matching object' error if data are consistent.

Other changes:

* GraphQL auto configuration behaviour was changed in case when a
  connection parts count is the same with underlying index, the index is
  unique and some index parts are nullable and some are not. Now it
  generates 1:1 connection (and lean on runtime checks) instead of
  giving an error.

Part of #135.
@Totktonada Totktonada added bug Something isn't working enhancement New feature or request customer labels Jun 20, 2018
@Totktonada Totktonada self-assigned this Jun 20, 2018
@Totktonada Totktonada requested a review from SudoBobo June 20, 2018 13:10
This check was implemented improperly: it can be triggered by an user
using filters that do not match anything. The check was removed in the
previous commit. Now it is implemented correctly.

The option 'disable_dangling_check' to disable this check was
introduced.

Fixes #135.
@Totktonada Totktonada force-pushed the gh-135-relax-1-1-connection-constraint branch from 90482bd to 11d5e4e Compare June 20, 2018 14:48
@Totktonada Totktonada merged commit 143c35e into master Jun 20, 2018
@Totktonada Totktonada deleted the gh-135-relax-1-1-connection-constraint branch June 20, 2018 14:56
Totktonada added a commit that referenced this pull request Jun 20, 2018
Success case: {data = ...}
Error case: {errors = {message = ..., ...}}

compiled_query:execute(...) becomes exception-safe (performs pcall
internally), but graphql.new(...):compile() and
graphql.new(...).execute(...) still can throw an exception.

Enabled 5_2 test in common.test.lua, it fails before fix for #135 (
PR #178).

Increased timeout to 10 seconds in pcre.test.lua and
nested_args.test.lua (#137).

Prerequisite for #71.
Prerequisite for #134.
Fixes #137.
Totktonada added a commit that referenced this pull request Jun 21, 2018
Success case: {data = ...}
Error case: {errors = {message = ..., ...}}

compiled_query:execute(...) becomes exception-safe (performs pcall
internally), but graphql.new(...):compile() and
graphql.new(...).execute(...) still can throw an exception.

Enabled 5_2 test in common.test.lua, it fails before fix for #135 (
PR #178).

Increased timeout to 10 seconds in pcre.test.lua and
nested_args.test.lua (#137).

Prerequisite for #71.
Prerequisite for #134.
Fixes #137.
Totktonada added a commit that referenced this pull request Jun 22, 2018
Success case: {data = ...}
Error case: {errors = {message = ..., ...}}

compiled_query:execute(...) becomes exception-safe (performs pcall
internally), but graphql.new(...):compile() and
graphql.new(...).execute(...) still can throw an exception.

Enabled 5_2 test in common.test.lua, it fails before fix for #135 (
PR #178).

Increased timeout to 10 seconds in pcre.test.lua and
nested_args.test.lua (#137).

Prerequisite for #71.
Prerequisite for #134.
Fixes #137.
Totktonada added a commit that referenced this pull request Jun 22, 2018
Success case: {data = ...}
Error case: {errors = {message = ..., ...}}

compiled_query:execute(...) becomes exception-safe (performs pcall
internally), but graphql.new(...):compile() and
graphql.new(...).execute(...) still can throw an exception.

Enabled 5_2 test in common.test.lua, it fails before fix for #135 (
PR #178).

Prerequisite for #71.
Prerequisite for #134.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working customer enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant