-
Notifications
You must be signed in to change notification settings - Fork 99
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
Generate id for schemas without primary key #173
Generate id for schemas without primary key #173
Conversation
@benwilson512 please let me know whether this approach OK, and you're ready to merge it, so I could add some tests |
Hi @fuelen can you elaborate a bit more? What sort of |
Hi @benwilson512 If we talk in terms of the schema example above, then I do the following GraphQL query {
users {
address {
country { name }
}
} the object :address do
field(:country, :country, resolve: dataloader(MyApp.Geography))
end nothing special, the resolution of :country field is completely handled by dataloader, no custom options. Let's say we have 2 users. One user doesn't have set a country in his address (country_id is null). I want to remind, that Address is an embedded schema. Because of this, primary key for embedded schema that doesn't have primary keys is always |
Hey @benwilson512 |
Hi @fuelen this seems fine, please just add a test. |
handles a case when embedded schema struct belongs to a regular record
3361ad1
to
f2b6a9c
Compare
Added a test |
Hi @benwilson512 |
Thanks! |
handles a case when embedded schema struct belongs to normal record, like