-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
wrong relation resolving in multiple schemas environment #457
Labels
bug
Something isn't working
Comments
Unrelated to the issue but worth mentioning, for query: query MyQuery {
news @schema(name:"client_01") {
user_id
users @schema(name: "client_01") {
id
}
}
} @Schema directive is properly applied to child fields (in this case, |
Is this still an issue for you will look into fixing it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of GraphJin are you using?
graphjin version
github.com/dosco/graphjin/core/v3 v3.0.0-20230605081643-067f320de10a
Have you tried reproducing the issue with the latest release?
Yes
Specs
mysql
Steps to reproduce the issue (config used to run GraphJin).
Needs 2 or more schemas with at minimum 2 related tables.
news.user_id
->user.id
Observed behaviour
After debugging the library, it seems the resolver for relational info is implemented with shortest path logic and didn't take into account which schema the root/parent table came from, hence sometimes will yield wrong edgeinfo.
For example, i have duplicated my schema and prefixed the duplicate with
test
.Querying this:
Yields sql:
Notice how it referencing wrong schema (expected:
local_jalremp
, got:local_jalremp_test
)Expected behaviour and actual result.
Table relationship resolving need to take into account the schema of the parent
The text was updated successfully, but these errors were encountered: