Closed tirumaraiselvan closed 5 years ago
Indeed. That format sounds sensible to me. So that would directly correspond to the real graphql format.
Also, could remote_field
become remote_fields
? Given that it's an object in your example, we could pull more than one field from the same remote. That sounds reasonable?
We could also move to that format now (for PR 2) or a PR 1.5 to be like:
remote_field:
stripe:
arguments:
account_id: "$id"
This syntax would match our existing functionality, but be directly extendable into your addition of the fields
, when we get to that.
Also, could remote_field become remote_fields? Given that it's an object in your example, we could pull more than one field from the same remote. That sounds reasonable?
For simplicity, I think it's reasonable (reasoning / implementation wise) to expect one relationship -> one field. If somebody needs to call more than one field then let them create another relationship.
We could also move to that format now (for PR 2) or a PR 1.5 to be like:
Yes, we can do that in PR 1.5
VALID
query {
user {
id
name
stripe_account_id
strip_sub_id
stripeSubRel {
sub_id
sub_last_timestamp
sub_status
}
}
VALID
query {
user {
id
name
stripe_account_id
strip_sub_id
stripeSubRel (sort_sub_by: "sub_last_timestamp") { --- `sort_sub_by` comes from `subscriptions` field
sub_id
sub_last_timestamp
sub_status
}
}
INVALID
query {
user {
id
name
stripe_account_id
strip_sub_id
stripeSubRel (group: "creation_timestamp") { --- `group` argument comes from `stripe` field and not from `subscription` field
sub_id
sub_last_timestamp
sub_status
}
}
INVALID
query {
user {
id
name
stripe_account_id
strip_sub_id
stripeSubRel (sub_id: "xyz") { --- `sub_id` argument comes from relationship info
sub_id
sub_last_timestamp
sub_status
}
}
closed by #16
We should allow to join with fields like:
This will involve changing the metadata API to something like: