basic support for fragments
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
fragment profileData on User {
|
||||
name
|
||||
emails
|
||||
}
|
||||
|
||||
query {
|
||||
user {
|
||||
id
|
||||
...profileData
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
type ProfileData struct {
|
||||
Name *string `json:"name"`
|
||||
Emails []string `json:"emails"`
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
User *struct {
|
||||
Id string `json:"id"`
|
||||
ProfileData
|
||||
} `json:"user"`
|
||||
}
|
||||
Reference in New Issue
Block a user