You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you tried reproducing the issue with the latest release?
Yes
Specs
DB: mysql
Steps to reproduce the issue (config used to run GraphJin).
Needs 2 or more schemas with at minimum 2 related tables.
Create a schema with basic table relationship, such as news.user_id -> user.id
Duplicate schema 2 or 3 times
Connect to one of the schema
Do simple query AT other schema such as:
queryMyQuery {
news@schema(name:"client_01") {
user_idusers {
id
}
}
}
Graphjin will sometimes relate the table to wrong schema
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:
@Schema directive is properly applied to child fields (in this case, users), but inherent table relationship takes precedence over qcode.Select.Schema, is this an intended behaviour?
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: