Closed as not planned
Description
Use case
Suppose we have this query:
query Users {
users {
...someUserFragment
...otherUserFragment
}
}
fragment someUserFragment on User {
id
firstName
lastName
}
fragment otherUserFragment on User {
id
firstName
dateOfBirth
}
It wouldn't necessarily be needed to send the id
and firstName
field defined in otherUserFragment
to the server, as those fields are already defined inside the someUserFragment
. The server would respond with the exact same response if we were to drop those fields on the otherUserFragment
. So we can safely save a few bytes that way.
As an example, the above query could result in the following document after generating:
query Users {
users {
...someUserFragment
...otherUserFragment
}
}
fragment someUserFragment on User {
id
firstName
lastName
}
fragment otherUserFragment on User {
dateOfBirth
}
Describe the solution you'd like
No response