Problems:
1. Type name collision:
Problems on Recursive types and alias selections
For example If we have:
type Person (id: ID) {
name: String!
parent: Person!
friend: Person!
}
And we select
{
user {
name
friend {
name
}
parent {
name
}
bestFriend: friend {
name
parent {
name
}
}
}
}
We have to Generate 5 Person types with diferent subsets of field, how we name them?
Solution:
User from {user
UserFriend: from {user{freind
UserParent: from {user{parent
UserBestFriend: from {user{bestFrend
UserBestFriendParent: from {user{bestFrend{parent
each type will have fields with type namespace
Problems:
1. Type name collision:
Problems on Recursive types and alias selections
For example If we have:
And we select
{ user { name friend { name } parent { name } bestFriend: friend { name parent { name } } } }We have to Generate 5 Person types with diferent subsets of field, how we name them?
Solution:
Userfrom{userUserFriend: from{user{freindUserParent: from{user{parentUserBestFriend: from{user{bestFrendUserBestFriendParent: from{user{bestFrend{parenteach type will have fields with type namespace