Expose the graphql operation as a constant in the generated genqlient file (#238)
This allows client code to see the operation (query or mutation) exactly
as genqlient sends it over the wire. This data was already available in
the generated safelist.json file, but now it's easily available from Go
code as well.
Fixes #236
I have:
- [x] Written a clear PR title and description (above)
- [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
- [x] Added tests covering my changes, if applicable
- [x] Included a link to the issue fixed, if applicable
- [x] Included documentation, for new features
- [x] Added an entry to the changelog
This commit is contained in:
@@ -25,6 +25,7 @@ When releasing a new version:
|
|||||||
### New features:
|
### New features:
|
||||||
|
|
||||||
- You can now bind all types from a package in `genqlient.yaml` using the new `package_bindings` option.
|
- You can now bind all types from a package in `genqlient.yaml` using the new `package_bindings` option.
|
||||||
|
- The graphql operation (query or mutation) as sent over the wire is now exposed via a constant in the generated genqlient .go file.
|
||||||
|
|
||||||
### Bug fixes:
|
### Bug fixes:
|
||||||
|
|
||||||
|
|||||||
+22
-16
@@ -69,6 +69,16 @@ func (v *getViewerViewerUser) GetMyName() string { return v.MyName }
|
|||||||
// GetCreatedAt returns getViewerViewerUser.CreatedAt, and is useful for accessing the field via an interface.
|
// GetCreatedAt returns getViewerViewerUser.CreatedAt, and is useful for accessing the field via an interface.
|
||||||
func (v *getViewerViewerUser) GetCreatedAt() time.Time { return v.CreatedAt }
|
func (v *getViewerViewerUser) GetCreatedAt() time.Time { return v.CreatedAt }
|
||||||
|
|
||||||
|
// The query or mutation executed by getUser.
|
||||||
|
const getUserOperation = `
|
||||||
|
query getUser ($Login: String!) {
|
||||||
|
user(login: $Login) {
|
||||||
|
theirName: name
|
||||||
|
createdAt
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
// getUser gets the given user's name from their username.
|
// getUser gets the given user's name from their username.
|
||||||
func getUser(
|
func getUser(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
@@ -77,14 +87,7 @@ func getUser(
|
|||||||
) (*getUserResponse, error) {
|
) (*getUserResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "getUser",
|
OpName: "getUser",
|
||||||
Query: `
|
Query: getUserOperation,
|
||||||
query getUser ($Login: String!) {
|
|
||||||
user(login: $Login) {
|
|
||||||
theirName: name
|
|
||||||
createdAt
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__getUserInput{
|
Variables: &__getUserInput{
|
||||||
Login: Login,
|
Login: Login,
|
||||||
},
|
},
|
||||||
@@ -103,20 +106,23 @@ query getUser ($Login: String!) {
|
|||||||
return &data, err
|
return &data, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func getViewer(
|
// The query or mutation executed by getViewer.
|
||||||
ctx context.Context,
|
const getViewerOperation = `
|
||||||
client graphql.Client,
|
|
||||||
) (*getViewerResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "getViewer",
|
|
||||||
Query: `
|
|
||||||
query getViewer {
|
query getViewer {
|
||||||
viewer {
|
viewer {
|
||||||
MyName: name
|
MyName: name
|
||||||
createdAt
|
createdAt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func getViewer(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
) (*getViewerResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "getViewer",
|
||||||
|
Query: getViewerOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// The query or mutation executed by {{.Name}}.
|
||||||
|
const {{.Name}}Operation = `{{$.Body}}`
|
||||||
|
|
||||||
{{.Doc}}
|
{{.Doc}}
|
||||||
func {{.Name}}(
|
func {{.Name}}(
|
||||||
{{if ne .Config.ContextType "-" -}}
|
{{if ne .Config.ContextType "-" -}}
|
||||||
@@ -15,7 +18,7 @@ func {{.Name}}(
|
|||||||
) (*{{.ResponseName}}, {{if .Config.Extensions -}}map[string]interface{},{{end}} error) {
|
) (*{{.ResponseName}}, {{if .Config.Extensions -}}map[string]interface{},{{end}} error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "{{.Name}}",
|
OpName: "{{.Name}}",
|
||||||
Query: `{{.Body}}`,
|
Query: {{.Name}}Operation,
|
||||||
{{if .Input -}}
|
{{if .Input -}}
|
||||||
Variables: &{{.Input.GoName}}{
|
Variables: &{{.Input.GoName}}{
|
||||||
{{range .Input.Fields -}}
|
{{range .Input.Fields -}}
|
||||||
|
|||||||
+15
-12
@@ -1340,17 +1340,8 @@ func (v *ComplexInlineFragmentsRootTopic) GetSchoolGrade() string { return v.Sch
|
|||||||
// GetName returns ComplexInlineFragmentsRootTopic.Name, and is useful for accessing the field via an interface.
|
// GetName returns ComplexInlineFragmentsRootTopic.Name, and is useful for accessing the field via an interface.
|
||||||
func (v *ComplexInlineFragmentsRootTopic) GetName() string { return v.Name }
|
func (v *ComplexInlineFragmentsRootTopic) GetName() string { return v.Name }
|
||||||
|
|
||||||
// We test all the spread cases from docs/DESIGN.md, see there for more context
|
// The query or mutation executed by ComplexInlineFragments.
|
||||||
// on each, as well as various other nonsense. But for abstract-in-abstract
|
const ComplexInlineFragmentsOperation = `
|
||||||
// spreads, we can't test cases (4b) and (4c), where I implements J or vice
|
|
||||||
// versa, because gqlparser doesn't support interfaces that implement other
|
|
||||||
// interfaces yet.
|
|
||||||
func ComplexInlineFragments(
|
|
||||||
client graphql.Client,
|
|
||||||
) (*ComplexInlineFragmentsResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "ComplexInlineFragments",
|
|
||||||
Query: `
|
|
||||||
query ComplexInlineFragments {
|
query ComplexInlineFragments {
|
||||||
root {
|
root {
|
||||||
id
|
id
|
||||||
@@ -1436,7 +1427,19 @@ query ComplexInlineFragments {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
// We test all the spread cases from docs/DESIGN.md, see there for more context
|
||||||
|
// on each, as well as various other nonsense. But for abstract-in-abstract
|
||||||
|
// spreads, we can't test cases (4b) and (4c), where I implements J or vice
|
||||||
|
// versa, because gqlparser doesn't support interfaces that implement other
|
||||||
|
// interfaces yet.
|
||||||
|
func ComplexInlineFragments(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*ComplexInlineFragmentsResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "ComplexInlineFragments",
|
||||||
|
Query: ComplexInlineFragmentsOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -1739,12 +1739,8 @@ type VideoFieldsThumbnail struct {
|
|||||||
// GetId returns VideoFieldsThumbnail.Id, and is useful for accessing the field via an interface.
|
// GetId returns VideoFieldsThumbnail.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *VideoFieldsThumbnail) GetId() testutil.ID { return v.Id }
|
func (v *VideoFieldsThumbnail) GetId() testutil.ID { return v.Id }
|
||||||
|
|
||||||
func ComplexNamedFragments(
|
// The query or mutation executed by ComplexNamedFragments.
|
||||||
client graphql.Client,
|
const ComplexNamedFragmentsOperation = `
|
||||||
) (*ComplexNamedFragmentsResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "ComplexNamedFragments",
|
|
||||||
Query: `
|
|
||||||
query ComplexNamedFragments {
|
query ComplexNamedFragments {
|
||||||
... on Query {
|
... on Query {
|
||||||
... QueryFragment
|
... QueryFragment
|
||||||
@@ -1802,7 +1798,14 @@ fragment MoreVideoFields on Video {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func ComplexNamedFragments(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*ComplexNamedFragmentsResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "ComplexNamedFragments",
|
||||||
|
Query: ComplexNamedFragmentsOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -2346,12 +2346,8 @@ type TopicFieldsRelatedTopic struct {
|
|||||||
// GetId returns TopicFieldsRelatedTopic.Id, and is useful for accessing the field via an interface.
|
// GetId returns TopicFieldsRelatedTopic.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *TopicFieldsRelatedTopic) GetId() testutil.ID { return v.Id }
|
func (v *TopicFieldsRelatedTopic) GetId() testutil.ID { return v.Id }
|
||||||
|
|
||||||
func CovariantInterfaceImplementation(
|
// The query or mutation executed by CovariantInterfaceImplementation.
|
||||||
client graphql.Client,
|
const CovariantInterfaceImplementationOperation = `
|
||||||
) (*CovariantInterfaceImplementationResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "CovariantInterfaceImplementation",
|
|
||||||
Query: `
|
|
||||||
query CovariantInterfaceImplementation {
|
query CovariantInterfaceImplementation {
|
||||||
randomItem {
|
randomItem {
|
||||||
__typename
|
__typename
|
||||||
@@ -2394,7 +2390,14 @@ fragment TopicFields on Topic {
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func CovariantInterfaceImplementation(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*CovariantInterfaceImplementationResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "CovariantInterfaceImplementation",
|
||||||
|
Query: CovariantInterfaceImplementationOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+11
-8
@@ -174,20 +174,23 @@ func (v *__CustomMarshalInput) __premarshalJSON() (*__premarshal__CustomMarshalI
|
|||||||
return &retval, nil
|
return &retval, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func CustomMarshal(
|
// The query or mutation executed by CustomMarshal.
|
||||||
client graphql.Client,
|
const CustomMarshalOperation = `
|
||||||
date time.Time,
|
|
||||||
) (*CustomMarshalResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "CustomMarshal",
|
|
||||||
Query: `
|
|
||||||
query CustomMarshal ($date: Date!) {
|
query CustomMarshal ($date: Date!) {
|
||||||
usersBornOn(date: $date) {
|
usersBornOn(date: $date) {
|
||||||
id
|
id
|
||||||
birthdate
|
birthdate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func CustomMarshal(
|
||||||
|
client graphql.Client,
|
||||||
|
date time.Time,
|
||||||
|
) (*CustomMarshalResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "CustomMarshal",
|
||||||
|
Query: CustomMarshalOperation,
|
||||||
Variables: &__CustomMarshalInput{
|
Variables: &__CustomMarshalInput{
|
||||||
Date: date,
|
Date: date,
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
+9
-6
@@ -203,6 +203,14 @@ func (v *__CustomMarshalSliceInput) __premarshalJSON() (*__premarshal__CustomMar
|
|||||||
return &retval, nil
|
return &retval, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The query or mutation executed by CustomMarshalSlice.
|
||||||
|
const CustomMarshalSliceOperation = `
|
||||||
|
query CustomMarshalSlice ($datesss: [[[Date!]!]!]!, $datesssp: [[[Date!]!]!]!) {
|
||||||
|
acceptsListOfListOfListsOfDates(datesss: $datesss)
|
||||||
|
withPointer: acceptsListOfListOfListsOfDates(datesss: $datesssp)
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func CustomMarshalSlice(
|
func CustomMarshalSlice(
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
datesss [][][]time.Time,
|
datesss [][][]time.Time,
|
||||||
@@ -210,12 +218,7 @@ func CustomMarshalSlice(
|
|||||||
) (*CustomMarshalSliceResponse, error) {
|
) (*CustomMarshalSliceResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "CustomMarshalSlice",
|
OpName: "CustomMarshalSlice",
|
||||||
Query: `
|
Query: CustomMarshalSliceOperation,
|
||||||
query CustomMarshalSlice ($datesss: [[[Date!]!]!]!, $datesssp: [[[Date!]!]!]!) {
|
|
||||||
acceptsListOfListOfListsOfDates(datesss: $datesss)
|
|
||||||
withPointer: acceptsListOfListOfListsOfDates(datesss: $datesssp)
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__CustomMarshalSliceInput{
|
Variables: &__CustomMarshalSliceInput{
|
||||||
Datesss: datesss,
|
Datesss: datesss,
|
||||||
Datesssp: datesssp,
|
Datesssp: datesssp,
|
||||||
|
|||||||
+8
-5
@@ -28,6 +28,13 @@ type convertTimezoneResponse struct {
|
|||||||
// GetConvert returns convertTimezoneResponse.Convert, and is useful for accessing the field via an interface.
|
// GetConvert returns convertTimezoneResponse.Convert, and is useful for accessing the field via an interface.
|
||||||
func (v *convertTimezoneResponse) GetConvert() time.Time { return v.Convert }
|
func (v *convertTimezoneResponse) GetConvert() time.Time { return v.Convert }
|
||||||
|
|
||||||
|
// The query or mutation executed by convertTimezone.
|
||||||
|
const convertTimezoneOperation = `
|
||||||
|
query convertTimezone ($dt: DateTime!, $tz: String) {
|
||||||
|
convert(dt: $dt, tz: $tz)
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func convertTimezone(
|
func convertTimezone(
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
dt time.Time,
|
dt time.Time,
|
||||||
@@ -35,11 +42,7 @@ func convertTimezone(
|
|||||||
) (*convertTimezoneResponse, error) {
|
) (*convertTimezoneResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "convertTimezone",
|
OpName: "convertTimezone",
|
||||||
Query: `
|
Query: convertTimezoneOperation,
|
||||||
query convertTimezone ($dt: DateTime!, $tz: String) {
|
|
||||||
convert(dt: $dt, tz: $tz)
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__convertTimezoneInput{
|
Variables: &__convertTimezoneInput{
|
||||||
Dt: dt,
|
Dt: dt,
|
||||||
Tz: tz,
|
Tz: tz,
|
||||||
|
|||||||
+9
-6
@@ -20,17 +20,20 @@ func (v *EmptyInterfaceResponse) GetGetComplexJunk() []map[string]*[]*map[string
|
|||||||
return v.GetComplexJunk
|
return v.GetComplexJunk
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The query or mutation executed by EmptyInterface.
|
||||||
|
const EmptyInterfaceOperation = `
|
||||||
|
query EmptyInterface {
|
||||||
|
getJunk
|
||||||
|
getComplexJunk
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func EmptyInterface(
|
func EmptyInterface(
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*EmptyInterfaceResponse, error) {
|
) (*EmptyInterfaceResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "EmptyInterface",
|
OpName: "EmptyInterface",
|
||||||
Query: `
|
Query: EmptyInterfaceOperation,
|
||||||
query EmptyInterface {
|
|
||||||
getJunk
|
|
||||||
getComplexJunk
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -266,12 +266,8 @@ type VideoFieldsParentTopic struct {
|
|||||||
// GetVideoChildren returns VideoFieldsParentTopic.VideoChildren, and is useful for accessing the field via an interface.
|
// GetVideoChildren returns VideoFieldsParentTopic.VideoChildren, and is useful for accessing the field via an interface.
|
||||||
func (v *VideoFieldsParentTopic) GetVideoChildren() []ChildVideoFields { return v.VideoChildren }
|
func (v *VideoFieldsParentTopic) GetVideoChildren() []ChildVideoFields { return v.VideoChildren }
|
||||||
|
|
||||||
func ComplexNamedFragments(
|
// The query or mutation executed by ComplexNamedFragments.
|
||||||
client graphql.Client,
|
const ComplexNamedFragmentsOperation = `
|
||||||
) (*InnerQueryFragment, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "ComplexNamedFragments",
|
|
||||||
Query: `
|
|
||||||
query ComplexNamedFragments {
|
query ComplexNamedFragments {
|
||||||
... QueryFragment
|
... QueryFragment
|
||||||
}
|
}
|
||||||
@@ -306,7 +302,14 @@ fragment ChildVideoFields on Video {
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func ComplexNamedFragments(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*InnerQueryFragment, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "ComplexNamedFragments",
|
||||||
|
Query: ComplexNamedFragmentsOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -54,19 +54,22 @@ type __InputEnumQueryInput struct {
|
|||||||
// GetRole returns __InputEnumQueryInput.Role, and is useful for accessing the field via an interface.
|
// GetRole returns __InputEnumQueryInput.Role, and is useful for accessing the field via an interface.
|
||||||
func (v *__InputEnumQueryInput) GetRole() Role { return v.Role }
|
func (v *__InputEnumQueryInput) GetRole() Role { return v.Role }
|
||||||
|
|
||||||
|
// The query or mutation executed by InputEnumQuery.
|
||||||
|
const InputEnumQueryOperation = `
|
||||||
|
query InputEnumQuery ($role: Role!) {
|
||||||
|
usersWithRole(role: $role) {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func InputEnumQuery(
|
func InputEnumQuery(
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
role Role,
|
role Role,
|
||||||
) (*InputEnumQueryResponse, error) {
|
) (*InputEnumQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "InputEnumQuery",
|
OpName: "InputEnumQuery",
|
||||||
Query: `
|
Query: InputEnumQueryOperation,
|
||||||
query InputEnumQuery ($role: Role!) {
|
|
||||||
usersWithRole(role: $role) {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__InputEnumQueryInput{
|
Variables: &__InputEnumQueryInput{
|
||||||
Role: role,
|
Role: role,
|
||||||
},
|
},
|
||||||
|
|||||||
+10
-7
@@ -177,19 +177,22 @@ type __InputObjectQueryInput struct {
|
|||||||
// GetQuery returns __InputObjectQueryInput.Query, and is useful for accessing the field via an interface.
|
// GetQuery returns __InputObjectQueryInput.Query, and is useful for accessing the field via an interface.
|
||||||
func (v *__InputObjectQueryInput) GetQuery() UserQueryInput { return v.Query }
|
func (v *__InputObjectQueryInput) GetQuery() UserQueryInput { return v.Query }
|
||||||
|
|
||||||
|
// The query or mutation executed by InputObjectQuery.
|
||||||
|
const InputObjectQueryOperation = `
|
||||||
|
query InputObjectQuery ($query: UserQueryInput) {
|
||||||
|
user(query: $query) {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func InputObjectQuery(
|
func InputObjectQuery(
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
query UserQueryInput,
|
query UserQueryInput,
|
||||||
) (*InputObjectQueryResponse, error) {
|
) (*InputObjectQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "InputObjectQuery",
|
OpName: "InputObjectQuery",
|
||||||
Query: `
|
Query: InputObjectQueryOperation,
|
||||||
query InputObjectQuery ($query: UserQueryInput) {
|
|
||||||
user(query: $query) {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__InputObjectQueryInput{
|
Variables: &__InputObjectQueryInput{
|
||||||
Query: query,
|
Query: query,
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
+10
-7
@@ -520,12 +520,8 @@ func (v *InterfaceListFieldWithPointerTopicChildrenVideo) GetId() testutil.ID {
|
|||||||
// GetName returns InterfaceListFieldWithPointerTopicChildrenVideo.Name, and is useful for accessing the field via an interface.
|
// GetName returns InterfaceListFieldWithPointerTopicChildrenVideo.Name, and is useful for accessing the field via an interface.
|
||||||
func (v *InterfaceListFieldWithPointerTopicChildrenVideo) GetName() string { return v.Name }
|
func (v *InterfaceListFieldWithPointerTopicChildrenVideo) GetName() string { return v.Name }
|
||||||
|
|
||||||
func InterfaceListField(
|
// The query or mutation executed by InterfaceListField.
|
||||||
client graphql.Client,
|
const InterfaceListFieldOperation = `
|
||||||
) (*InterfaceListFieldResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "InterfaceListField",
|
|
||||||
Query: `
|
|
||||||
query InterfaceListField {
|
query InterfaceListField {
|
||||||
root {
|
root {
|
||||||
id
|
id
|
||||||
@@ -546,7 +542,14 @@ query InterfaceListField {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func InterfaceListField(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*InterfaceListFieldResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "InterfaceListField",
|
||||||
|
Query: InterfaceListFieldOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -506,12 +506,8 @@ func (v *InterfaceListOfListOfListsFieldWithPointerVideo) GetId() *testutil.ID {
|
|||||||
// GetName returns InterfaceListOfListOfListsFieldWithPointerVideo.Name, and is useful for accessing the field via an interface.
|
// GetName returns InterfaceListOfListOfListsFieldWithPointerVideo.Name, and is useful for accessing the field via an interface.
|
||||||
func (v *InterfaceListOfListOfListsFieldWithPointerVideo) GetName() *string { return v.Name }
|
func (v *InterfaceListOfListOfListsFieldWithPointerVideo) GetName() *string { return v.Name }
|
||||||
|
|
||||||
func InterfaceListOfListOfListsField(
|
// The query or mutation executed by InterfaceListOfListOfListsField.
|
||||||
client graphql.Client,
|
const InterfaceListOfListOfListsFieldOperation = `
|
||||||
) (*InterfaceListOfListOfListsFieldResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "InterfaceListOfListOfListsField",
|
|
||||||
Query: `
|
|
||||||
query InterfaceListOfListOfListsField {
|
query InterfaceListOfListOfListsField {
|
||||||
listOfListsOfListsOfContent {
|
listOfListsOfListsOfContent {
|
||||||
__typename
|
__typename
|
||||||
@@ -524,7 +520,14 @@ query InterfaceListOfListOfListsField {
|
|||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func InterfaceListOfListOfListsField(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*InterfaceListOfListOfListsFieldResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "InterfaceListOfListOfListsField",
|
||||||
|
Query: InterfaceListOfListOfListsFieldOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+10
-7
@@ -504,12 +504,8 @@ func (v *InterfaceNestingRootTopicChildrenVideo) GetParent() InterfaceNestingRoo
|
|||||||
return v.Parent
|
return v.Parent
|
||||||
}
|
}
|
||||||
|
|
||||||
func InterfaceNesting(
|
// The query or mutation executed by InterfaceNesting.
|
||||||
client graphql.Client,
|
const InterfaceNestingOperation = `
|
||||||
) (*InterfaceNestingResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "InterfaceNesting",
|
|
||||||
Query: `
|
|
||||||
query InterfaceNesting {
|
query InterfaceNesting {
|
||||||
root {
|
root {
|
||||||
id
|
id
|
||||||
@@ -526,7 +522,14 @@ query InterfaceNesting {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func InterfaceNesting(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*InterfaceNestingResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "InterfaceNesting",
|
||||||
|
Query: InterfaceNestingOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -626,12 +626,8 @@ func (v *InterfaceNoFragmentsQueryWithPointerVideo) GetId() *testutil.ID { retur
|
|||||||
// GetName returns InterfaceNoFragmentsQueryWithPointerVideo.Name, and is useful for accessing the field via an interface.
|
// GetName returns InterfaceNoFragmentsQueryWithPointerVideo.Name, and is useful for accessing the field via an interface.
|
||||||
func (v *InterfaceNoFragmentsQueryWithPointerVideo) GetName() *string { return v.Name }
|
func (v *InterfaceNoFragmentsQueryWithPointerVideo) GetName() *string { return v.Name }
|
||||||
|
|
||||||
func InterfaceNoFragmentsQuery(
|
// The query or mutation executed by InterfaceNoFragmentsQuery.
|
||||||
client graphql.Client,
|
const InterfaceNoFragmentsQueryOperation = `
|
||||||
) (*InterfaceNoFragmentsQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "InterfaceNoFragmentsQuery",
|
|
||||||
Query: `
|
|
||||||
query InterfaceNoFragmentsQuery {
|
query InterfaceNoFragmentsQuery {
|
||||||
root {
|
root {
|
||||||
id
|
id
|
||||||
@@ -653,7 +649,14 @@ query InterfaceNoFragmentsQuery {
|
|||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func InterfaceNoFragmentsQuery(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*InterfaceNoFragmentsQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "InterfaceNoFragmentsQuery",
|
||||||
|
Query: InterfaceNoFragmentsQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -41,19 +41,22 @@ type __ListInputQueryInput struct {
|
|||||||
// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
|
// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
|
||||||
func (v *__ListInputQueryInput) GetNames() []string { return v.Names }
|
func (v *__ListInputQueryInput) GetNames() []string { return v.Names }
|
||||||
|
|
||||||
|
// The query or mutation executed by ListInputQuery.
|
||||||
|
const ListInputQueryOperation = `
|
||||||
|
query ListInputQuery ($names: [String]) {
|
||||||
|
user(query: {names:$names}) {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func ListInputQuery(
|
func ListInputQuery(
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
names []string,
|
names []string,
|
||||||
) (*ListInputQueryResponse, error) {
|
) (*ListInputQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "ListInputQuery",
|
OpName: "ListInputQuery",
|
||||||
Query: `
|
Query: ListInputQueryOperation,
|
||||||
query ListInputQuery ($names: [String]) {
|
|
||||||
user(query: {names:$names}) {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__ListInputQueryInput{
|
Variables: &__ListInputQueryInput{
|
||||||
Names: names,
|
Names: names,
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
+8
-5
@@ -16,16 +16,19 @@ func (v *ListOfListsOfListsResponse) GetListOfListsOfLists() [][][]string {
|
|||||||
return v.ListOfListsOfLists
|
return v.ListOfListsOfLists
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The query or mutation executed by ListOfListsOfLists.
|
||||||
|
const ListOfListsOfListsOperation = `
|
||||||
|
query ListOfListsOfLists {
|
||||||
|
listOfListsOfLists
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func ListOfListsOfLists(
|
func ListOfListsOfLists(
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*ListOfListsOfListsResponse, error) {
|
) (*ListOfListsOfListsResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "ListOfListsOfLists",
|
OpName: "ListOfListsOfLists",
|
||||||
Query: `
|
Query: ListOfListsOfListsOperation,
|
||||||
query ListOfListsOfLists {
|
|
||||||
listOfListsOfLists
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+12
-9
@@ -325,14 +325,8 @@ func (v *__MultipleDirectivesInput) GetQuery() MyInput { return v.Query }
|
|||||||
// GetQueries returns __MultipleDirectivesInput.Queries, and is useful for accessing the field via an interface.
|
// GetQueries returns __MultipleDirectivesInput.Queries, and is useful for accessing the field via an interface.
|
||||||
func (v *__MultipleDirectivesInput) GetQueries() []*UserQueryInput { return v.Queries }
|
func (v *__MultipleDirectivesInput) GetQueries() []*UserQueryInput { return v.Queries }
|
||||||
|
|
||||||
func MultipleDirectives(
|
// The query or mutation executed by MultipleDirectives.
|
||||||
client graphql.Client,
|
const MultipleDirectivesOperation = `
|
||||||
query MyInput,
|
|
||||||
queries []*UserQueryInput,
|
|
||||||
) (*MyMultipleDirectivesResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "MultipleDirectives",
|
|
||||||
Query: `
|
|
||||||
query MultipleDirectives ($query: UserQueryInput, $queries: [UserQueryInput]) {
|
query MultipleDirectives ($query: UserQueryInput, $queries: [UserQueryInput]) {
|
||||||
user(query: $query) {
|
user(query: $query) {
|
||||||
id
|
id
|
||||||
@@ -341,7 +335,16 @@ query MultipleDirectives ($query: UserQueryInput, $queries: [UserQueryInput]) {
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func MultipleDirectives(
|
||||||
|
client graphql.Client,
|
||||||
|
query MyInput,
|
||||||
|
queries []*UserQueryInput,
|
||||||
|
) (*MyMultipleDirectivesResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "MultipleDirectives",
|
||||||
|
Query: MultipleDirectivesOperation,
|
||||||
Variables: &__MultipleDirectivesInput{
|
Variables: &__MultipleDirectivesInput{
|
||||||
Query: query,
|
Query: query,
|
||||||
Queries: queries,
|
Queries: queries,
|
||||||
|
|||||||
+15
-12
@@ -219,17 +219,8 @@ func (v *__OmitEmptyQueryInput) GetTz() string { return v.Tz }
|
|||||||
// GetTzNoOmitEmpty returns __OmitEmptyQueryInput.TzNoOmitEmpty, and is useful for accessing the field via an interface.
|
// GetTzNoOmitEmpty returns __OmitEmptyQueryInput.TzNoOmitEmpty, and is useful for accessing the field via an interface.
|
||||||
func (v *__OmitEmptyQueryInput) GetTzNoOmitEmpty() string { return v.TzNoOmitEmpty }
|
func (v *__OmitEmptyQueryInput) GetTzNoOmitEmpty() string { return v.TzNoOmitEmpty }
|
||||||
|
|
||||||
func OmitEmptyQuery(
|
// The query or mutation executed by OmitEmptyQuery.
|
||||||
client graphql.Client,
|
const OmitEmptyQueryOperation = `
|
||||||
query UserQueryInput,
|
|
||||||
queries []UserQueryInput,
|
|
||||||
dt time.Time,
|
|
||||||
tz string,
|
|
||||||
tzNoOmitEmpty string,
|
|
||||||
) (*OmitEmptyQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "OmitEmptyQuery",
|
|
||||||
Query: `
|
|
||||||
query OmitEmptyQuery ($query: UserQueryInput, $queries: [UserQueryInput], $dt: DateTime, $tz: String, $tzNoOmitEmpty: String) {
|
query OmitEmptyQuery ($query: UserQueryInput, $queries: [UserQueryInput], $dt: DateTime, $tz: String, $tzNoOmitEmpty: String) {
|
||||||
user(query: $query) {
|
user(query: $query) {
|
||||||
id
|
id
|
||||||
@@ -240,7 +231,19 @@ query OmitEmptyQuery ($query: UserQueryInput, $queries: [UserQueryInput], $dt: D
|
|||||||
maybeConvert(dt: $dt, tz: $tz)
|
maybeConvert(dt: $dt, tz: $tz)
|
||||||
convert2: maybeConvert(dt: $dt, tz: $tzNoOmitEmpty)
|
convert2: maybeConvert(dt: $dt, tz: $tzNoOmitEmpty)
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func OmitEmptyQuery(
|
||||||
|
client graphql.Client,
|
||||||
|
query UserQueryInput,
|
||||||
|
queries []UserQueryInput,
|
||||||
|
dt time.Time,
|
||||||
|
tz string,
|
||||||
|
tzNoOmitEmpty string,
|
||||||
|
) (*OmitEmptyQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "OmitEmptyQuery",
|
||||||
|
Query: OmitEmptyQueryOperation,
|
||||||
Variables: &__OmitEmptyQueryInput{
|
Variables: &__OmitEmptyQueryInput{
|
||||||
Query: query,
|
Query: query,
|
||||||
Queries: queries,
|
Queries: queries,
|
||||||
|
|||||||
+13
-10
@@ -230,15 +230,8 @@ func (v *__PointersQueryInput) GetDt() time.Time { return v.Dt }
|
|||||||
// GetTz returns __PointersQueryInput.Tz, and is useful for accessing the field via an interface.
|
// GetTz returns __PointersQueryInput.Tz, and is useful for accessing the field via an interface.
|
||||||
func (v *__PointersQueryInput) GetTz() *string { return v.Tz }
|
func (v *__PointersQueryInput) GetTz() *string { return v.Tz }
|
||||||
|
|
||||||
func PointersQuery(
|
// The query or mutation executed by PointersQuery.
|
||||||
client graphql.Client,
|
const PointersQueryOperation = `
|
||||||
query *UserQueryInput,
|
|
||||||
dt time.Time,
|
|
||||||
tz *string,
|
|
||||||
) (*PointersQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "PointersQuery",
|
|
||||||
Query: `
|
|
||||||
query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) {
|
query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) {
|
||||||
user(query: $query) {
|
user(query: $query) {
|
||||||
id
|
id
|
||||||
@@ -252,7 +245,17 @@ query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) {
|
|||||||
}
|
}
|
||||||
maybeConvert(dt: $dt, tz: $tz)
|
maybeConvert(dt: $dt, tz: $tz)
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func PointersQuery(
|
||||||
|
client graphql.Client,
|
||||||
|
query *UserQueryInput,
|
||||||
|
dt time.Time,
|
||||||
|
tz *string,
|
||||||
|
) (*PointersQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "PointersQuery",
|
||||||
|
Query: PointersQueryOperation,
|
||||||
Variables: &__PointersQueryInput{
|
Variables: &__PointersQueryInput{
|
||||||
Query: query,
|
Query: query,
|
||||||
Dt: dt,
|
Dt: dt,
|
||||||
|
|||||||
+13
-10
@@ -227,15 +227,8 @@ func (v *__PointersQueryInput) GetDt() *time.Time { return v.Dt }
|
|||||||
// GetTz returns __PointersQueryInput.Tz, and is useful for accessing the field via an interface.
|
// GetTz returns __PointersQueryInput.Tz, and is useful for accessing the field via an interface.
|
||||||
func (v *__PointersQueryInput) GetTz() string { return v.Tz }
|
func (v *__PointersQueryInput) GetTz() string { return v.Tz }
|
||||||
|
|
||||||
func PointersQuery(
|
// The query or mutation executed by PointersQuery.
|
||||||
client graphql.Client,
|
const PointersQueryOperation = `
|
||||||
query *UserQueryInput,
|
|
||||||
dt *time.Time,
|
|
||||||
tz string,
|
|
||||||
) (*PointersQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "PointersQuery",
|
|
||||||
Query: `
|
|
||||||
query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) {
|
query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) {
|
||||||
user(query: $query) {
|
user(query: $query) {
|
||||||
id
|
id
|
||||||
@@ -249,7 +242,17 @@ query PointersQuery ($query: UserQueryInput, $dt: DateTime, $tz: String) {
|
|||||||
}
|
}
|
||||||
maybeConvert(dt: $dt, tz: $tz)
|
maybeConvert(dt: $dt, tz: $tz)
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func PointersQuery(
|
||||||
|
client graphql.Client,
|
||||||
|
query *UserQueryInput,
|
||||||
|
dt *time.Time,
|
||||||
|
tz string,
|
||||||
|
) (*PointersQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "PointersQuery",
|
||||||
|
Query: PointersQueryOperation,
|
||||||
Variables: &__PointersQueryInput{
|
Variables: &__PointersQueryInput{
|
||||||
Query: query,
|
Query: query,
|
||||||
Dt: dt,
|
Dt: dt,
|
||||||
|
|||||||
+11
-8
@@ -71,13 +71,8 @@ type __GetPokemonSiblingsInput struct {
|
|||||||
// GetInput returns __GetPokemonSiblingsInput.Input, and is useful for accessing the field via an interface.
|
// GetInput returns __GetPokemonSiblingsInput.Input, and is useful for accessing the field via an interface.
|
||||||
func (v *__GetPokemonSiblingsInput) GetInput() testutil.Pokemon { return v.Input }
|
func (v *__GetPokemonSiblingsInput) GetInput() testutil.Pokemon { return v.Input }
|
||||||
|
|
||||||
func GetPokemonSiblings(
|
// The query or mutation executed by GetPokemonSiblings.
|
||||||
client graphql.Client,
|
const GetPokemonSiblingsOperation = `
|
||||||
input testutil.Pokemon,
|
|
||||||
) (*GetPokemonSiblingsResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "GetPokemonSiblings",
|
|
||||||
Query: `
|
|
||||||
query GetPokemonSiblings ($input: PokemonInput!) {
|
query GetPokemonSiblings ($input: PokemonInput!) {
|
||||||
user(query: {hasPokemon:$input}) {
|
user(query: {hasPokemon:$input}) {
|
||||||
id
|
id
|
||||||
@@ -93,7 +88,15 @@ query GetPokemonSiblings ($input: PokemonInput!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func GetPokemonSiblings(
|
||||||
|
client graphql.Client,
|
||||||
|
input testutil.Pokemon,
|
||||||
|
) (*GetPokemonSiblingsResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "GetPokemonSiblings",
|
||||||
|
Query: GetPokemonSiblingsOperation,
|
||||||
Variables: &__GetPokemonSiblingsInput{
|
Variables: &__GetPokemonSiblingsInput{
|
||||||
Input: input,
|
Input: input,
|
||||||
},
|
},
|
||||||
|
|||||||
+10
-7
@@ -40,19 +40,22 @@ func (v *QueryWithAliasUser) GetID() testutil.ID { return v.ID }
|
|||||||
// GetOtherID returns QueryWithAliasUser.OtherID, and is useful for accessing the field via an interface.
|
// GetOtherID returns QueryWithAliasUser.OtherID, and is useful for accessing the field via an interface.
|
||||||
func (v *QueryWithAliasUser) GetOtherID() testutil.ID { return v.OtherID }
|
func (v *QueryWithAliasUser) GetOtherID() testutil.ID { return v.OtherID }
|
||||||
|
|
||||||
func QueryWithAlias(
|
// The query or mutation executed by QueryWithAlias.
|
||||||
client graphql.Client,
|
const QueryWithAliasOperation = `
|
||||||
) (*QueryWithAliasResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "QueryWithAlias",
|
|
||||||
Query: `
|
|
||||||
query QueryWithAlias {
|
query QueryWithAlias {
|
||||||
User: user {
|
User: user {
|
||||||
ID: id
|
ID: id
|
||||||
otherID: id
|
otherID: id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func QueryWithAlias(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*QueryWithAliasResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "QueryWithAlias",
|
||||||
|
Query: QueryWithAliasOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -40,19 +40,22 @@ func (v *QueryWithDoubleAliasUser) GetID() testutil.ID { return v.ID }
|
|||||||
// GetAlsoID returns QueryWithDoubleAliasUser.AlsoID, and is useful for accessing the field via an interface.
|
// GetAlsoID returns QueryWithDoubleAliasUser.AlsoID, and is useful for accessing the field via an interface.
|
||||||
func (v *QueryWithDoubleAliasUser) GetAlsoID() testutil.ID { return v.AlsoID }
|
func (v *QueryWithDoubleAliasUser) GetAlsoID() testutil.ID { return v.AlsoID }
|
||||||
|
|
||||||
func QueryWithDoubleAlias(
|
// The query or mutation executed by QueryWithDoubleAlias.
|
||||||
client graphql.Client,
|
const QueryWithDoubleAliasOperation = `
|
||||||
) (*QueryWithDoubleAliasResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "QueryWithDoubleAlias",
|
|
||||||
Query: `
|
|
||||||
query QueryWithDoubleAlias {
|
query QueryWithDoubleAlias {
|
||||||
user {
|
user {
|
||||||
ID: id
|
ID: id
|
||||||
AlsoID: id
|
AlsoID: id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func QueryWithDoubleAlias(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*QueryWithDoubleAliasResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "QueryWithDoubleAlias",
|
||||||
|
Query: QueryWithDoubleAliasOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -62,12 +62,8 @@ const (
|
|||||||
RoleTeacher Role = "TEACHER"
|
RoleTeacher Role = "TEACHER"
|
||||||
)
|
)
|
||||||
|
|
||||||
func QueryWithEnums(
|
// The query or mutation executed by QueryWithEnums.
|
||||||
client graphql.Client,
|
const QueryWithEnumsOperation = `
|
||||||
) (*QueryWithEnumsResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "QueryWithEnums",
|
|
||||||
Query: `
|
|
||||||
query QueryWithEnums {
|
query QueryWithEnums {
|
||||||
user {
|
user {
|
||||||
roles
|
roles
|
||||||
@@ -76,7 +72,14 @@ query QueryWithEnums {
|
|||||||
roles
|
roles
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func QueryWithEnums(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*QueryWithEnumsResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "QueryWithEnums",
|
||||||
|
Query: QueryWithEnumsOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+10
-7
@@ -41,12 +41,8 @@ func (v *QueryWithSlicesUser) GetEmailsWithNulls() []string { return v.EmailsWit
|
|||||||
// GetEmailsWithNullsOrNull returns QueryWithSlicesUser.EmailsWithNullsOrNull, and is useful for accessing the field via an interface.
|
// GetEmailsWithNullsOrNull returns QueryWithSlicesUser.EmailsWithNullsOrNull, and is useful for accessing the field via an interface.
|
||||||
func (v *QueryWithSlicesUser) GetEmailsWithNullsOrNull() []string { return v.EmailsWithNullsOrNull }
|
func (v *QueryWithSlicesUser) GetEmailsWithNullsOrNull() []string { return v.EmailsWithNullsOrNull }
|
||||||
|
|
||||||
func QueryWithSlices(
|
// The query or mutation executed by QueryWithSlices.
|
||||||
client graphql.Client,
|
const QueryWithSlicesOperation = `
|
||||||
) (*QueryWithSlicesResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "QueryWithSlices",
|
|
||||||
Query: `
|
|
||||||
query QueryWithSlices {
|
query QueryWithSlices {
|
||||||
user {
|
user {
|
||||||
emails
|
emails
|
||||||
@@ -55,7 +51,14 @@ query QueryWithSlices {
|
|||||||
emailsWithNullsOrNull
|
emailsWithNullsOrNull
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func QueryWithSlices(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*QueryWithSlicesResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "QueryWithSlices",
|
||||||
|
Query: QueryWithSlicesOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+10
-7
@@ -43,12 +43,8 @@ func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetProvider() string { retur
|
|||||||
// GetEmail returns QueryWithStructsUserAuthMethodsAuthMethod.Email, and is useful for accessing the field via an interface.
|
// GetEmail returns QueryWithStructsUserAuthMethodsAuthMethod.Email, and is useful for accessing the field via an interface.
|
||||||
func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetEmail() string { return v.Email }
|
func (v *QueryWithStructsUserAuthMethodsAuthMethod) GetEmail() string { return v.Email }
|
||||||
|
|
||||||
func QueryWithStructs(
|
// The query or mutation executed by QueryWithStructs.
|
||||||
client graphql.Client,
|
const QueryWithStructsOperation = `
|
||||||
) (*QueryWithStructsResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "QueryWithStructs",
|
|
||||||
Query: `
|
|
||||||
query QueryWithStructs {
|
query QueryWithStructs {
|
||||||
user {
|
user {
|
||||||
authMethods {
|
authMethods {
|
||||||
@@ -57,7 +53,14 @@ query QueryWithStructs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func QueryWithStructs(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*QueryWithStructsResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "QueryWithStructs",
|
||||||
|
Query: QueryWithStructsOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+11
-8
@@ -68,13 +68,8 @@ type __RecursionInput struct {
|
|||||||
// GetInput returns __RecursionInput.Input, and is useful for accessing the field via an interface.
|
// GetInput returns __RecursionInput.Input, and is useful for accessing the field via an interface.
|
||||||
func (v *__RecursionInput) GetInput() RecursiveInput { return v.Input }
|
func (v *__RecursionInput) GetInput() RecursiveInput { return v.Input }
|
||||||
|
|
||||||
func Recursion(
|
// The query or mutation executed by Recursion.
|
||||||
client graphql.Client,
|
const RecursionOperation = `
|
||||||
input RecursiveInput,
|
|
||||||
) (*RecursionResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "Recursion",
|
|
||||||
Query: `
|
|
||||||
query Recursion ($input: RecursiveInput!) {
|
query Recursion ($input: RecursiveInput!) {
|
||||||
recur(input: $input) {
|
recur(input: $input) {
|
||||||
rec {
|
rec {
|
||||||
@@ -86,7 +81,15 @@ query Recursion ($input: RecursiveInput!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func Recursion(
|
||||||
|
client graphql.Client,
|
||||||
|
input RecursiveInput,
|
||||||
|
) (*RecursionResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "Recursion",
|
||||||
|
Query: RecursionOperation,
|
||||||
Variables: &__RecursionInput{
|
Variables: &__RecursionInput{
|
||||||
Input: input,
|
Input: input,
|
||||||
},
|
},
|
||||||
|
|||||||
+10
-7
@@ -239,12 +239,8 @@ func (v *SimpleInlineFragmentResponse) __premarshalJSON() (*__premarshalSimpleIn
|
|||||||
return &retval, nil
|
return &retval, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func SimpleInlineFragment(
|
// The query or mutation executed by SimpleInlineFragment.
|
||||||
client graphql.Client,
|
const SimpleInlineFragmentOperation = `
|
||||||
) (*SimpleInlineFragmentResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "SimpleInlineFragment",
|
|
||||||
Query: `
|
|
||||||
query SimpleInlineFragment {
|
query SimpleInlineFragment {
|
||||||
randomItem {
|
randomItem {
|
||||||
__typename
|
__typename
|
||||||
@@ -258,7 +254,14 @@ query SimpleInlineFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func SimpleInlineFragment(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*SimpleInlineFragmentResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "SimpleInlineFragment",
|
||||||
|
Query: SimpleInlineFragmentOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -41,19 +41,22 @@ type __SimpleInputQueryInput struct {
|
|||||||
// GetName returns __SimpleInputQueryInput.Name, and is useful for accessing the field via an interface.
|
// GetName returns __SimpleInputQueryInput.Name, and is useful for accessing the field via an interface.
|
||||||
func (v *__SimpleInputQueryInput) GetName() string { return v.Name }
|
func (v *__SimpleInputQueryInput) GetName() string { return v.Name }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleInputQuery.
|
||||||
|
const SimpleInputQueryOperation = `
|
||||||
|
query SimpleInputQuery ($name: String!) {
|
||||||
|
user(query: {name:$name}) {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleInputQuery(
|
func SimpleInputQuery(
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
name string,
|
name string,
|
||||||
) (*SimpleInputQueryResponse, error) {
|
) (*SimpleInputQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleInputQuery",
|
OpName: "SimpleInputQuery",
|
||||||
Query: `
|
Query: SimpleInputQueryOperation,
|
||||||
query SimpleInputQuery ($name: String!) {
|
|
||||||
user(query: {name:$name}) {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__SimpleInputQueryInput{
|
Variables: &__SimpleInputQueryInput{
|
||||||
Name: name,
|
Name: name,
|
||||||
},
|
},
|
||||||
|
|||||||
+11
-8
@@ -41,6 +41,16 @@ type __SimpleMutationInput struct {
|
|||||||
// GetName returns __SimpleMutationInput.Name, and is useful for accessing the field via an interface.
|
// GetName returns __SimpleMutationInput.Name, and is useful for accessing the field via an interface.
|
||||||
func (v *__SimpleMutationInput) GetName() string { return v.Name }
|
func (v *__SimpleMutationInput) GetName() string { return v.Name }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleMutation.
|
||||||
|
const SimpleMutationOperation = `
|
||||||
|
mutation SimpleMutation ($name: String!) {
|
||||||
|
createUser(name: $name) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
// SimpleMutation creates a user.
|
// SimpleMutation creates a user.
|
||||||
//
|
//
|
||||||
// It has a long doc-comment, to test that we handle that correctly.
|
// It has a long doc-comment, to test that we handle that correctly.
|
||||||
@@ -51,14 +61,7 @@ func SimpleMutation(
|
|||||||
) (*SimpleMutationResponse, error) {
|
) (*SimpleMutationResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleMutation",
|
OpName: "SimpleMutation",
|
||||||
Query: `
|
Query: SimpleMutationOperation,
|
||||||
mutation SimpleMutation ($name: String!) {
|
|
||||||
createUser(name: $name) {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__SimpleMutationInput{
|
Variables: &__SimpleMutationInput{
|
||||||
Name: name,
|
Name: name,
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
+10
-7
@@ -546,12 +546,8 @@ type VideoFieldsThumbnail struct {
|
|||||||
// GetId returns VideoFieldsThumbnail.Id, and is useful for accessing the field via an interface.
|
// GetId returns VideoFieldsThumbnail.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *VideoFieldsThumbnail) GetId() testutil.ID { return v.Id }
|
func (v *VideoFieldsThumbnail) GetId() testutil.ID { return v.Id }
|
||||||
|
|
||||||
func SimpleNamedFragment(
|
// The query or mutation executed by SimpleNamedFragment.
|
||||||
client graphql.Client,
|
const SimpleNamedFragmentOperation = `
|
||||||
) (*SimpleNamedFragmentResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "SimpleNamedFragment",
|
|
||||||
Query: `
|
|
||||||
query SimpleNamedFragment {
|
query SimpleNamedFragment {
|
||||||
randomItem {
|
randomItem {
|
||||||
__typename
|
__typename
|
||||||
@@ -573,7 +569,14 @@ fragment VideoFields on Video {
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func SimpleNamedFragment(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*SimpleNamedFragmentResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "SimpleNamedFragment",
|
||||||
|
Query: SimpleNamedFragmentOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -33,18 +33,21 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() testutil.ID { return v.Id }
|
func (v *SimpleQueryUser) GetId() testutil.ID { return v.Id }
|
||||||
|
|
||||||
func SimpleQuery(
|
// The query or mutation executed by SimpleQuery.
|
||||||
client graphql.Client,
|
const SimpleQueryOperation = `
|
||||||
) (*SimpleQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "SimpleQuery",
|
|
||||||
Query: `
|
|
||||||
query SimpleQuery {
|
query SimpleQuery {
|
||||||
user {
|
user {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func SimpleQuery(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*SimpleQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "SimpleQuery",
|
||||||
|
Query: SimpleQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -424,12 +424,8 @@ type VideoFields struct {
|
|||||||
// GetDuration returns VideoFields.Duration, and is useful for accessing the field via an interface.
|
// GetDuration returns VideoFields.Duration, and is useful for accessing the field via an interface.
|
||||||
func (v *VideoFields) GetDuration() int { return v.Duration }
|
func (v *VideoFields) GetDuration() int { return v.Duration }
|
||||||
|
|
||||||
func StructOption(
|
// The query or mutation executed by StructOption.
|
||||||
client graphql.Client,
|
const StructOptionOperation = `
|
||||||
) (*StructOptionResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "StructOption",
|
|
||||||
Query: `
|
|
||||||
query StructOption {
|
query StructOption {
|
||||||
root {
|
root {
|
||||||
id
|
id
|
||||||
@@ -457,7 +453,14 @@ query StructOption {
|
|||||||
fragment VideoFields on Video {
|
fragment VideoFields on Video {
|
||||||
duration
|
duration
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func StructOption(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*StructOptionResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "StructOption",
|
||||||
|
Query: StructOptionOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -37,19 +37,22 @@ func (v *TypeNameQueryUser) GetTypename() string { return v.Typename }
|
|||||||
// GetId returns TypeNameQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns TypeNameQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *TypeNameQueryUser) GetId() testutil.ID { return v.Id }
|
func (v *TypeNameQueryUser) GetId() testutil.ID { return v.Id }
|
||||||
|
|
||||||
func TypeNameQuery(
|
// The query or mutation executed by TypeNameQuery.
|
||||||
client graphql.Client,
|
const TypeNameQueryOperation = `
|
||||||
) (*TypeNameQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "TypeNameQuery",
|
|
||||||
Query: `
|
|
||||||
query TypeNameQuery {
|
query TypeNameQuery {
|
||||||
user {
|
user {
|
||||||
__typename
|
__typename
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func TypeNameQuery(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*TypeNameQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "TypeNameQuery",
|
||||||
|
Query: TypeNameQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -264,12 +264,8 @@ func (v *User) GetId() testutil.ID { return v.Id }
|
|||||||
// GetName returns User.Name, and is useful for accessing the field via an interface.
|
// GetName returns User.Name, and is useful for accessing the field via an interface.
|
||||||
func (v *User) GetName() string { return v.Name }
|
func (v *User) GetName() string { return v.Name }
|
||||||
|
|
||||||
func TypeNames(
|
// The query or mutation executed by TypeNames.
|
||||||
client graphql.Client,
|
const TypeNamesOperation = `
|
||||||
) (*Resp, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "TypeNames",
|
|
||||||
Query: `
|
|
||||||
query TypeNames {
|
query TypeNames {
|
||||||
user {
|
user {
|
||||||
id
|
id
|
||||||
@@ -285,7 +281,14 @@ query TypeNames {
|
|||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func TypeNames(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*Resp, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "TypeNames",
|
||||||
|
Query: TypeNamesOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+10
-7
@@ -174,18 +174,21 @@ func (v *UnionNoFragmentsQueryResponse) __premarshalJSON() (*__premarshalUnionNo
|
|||||||
return &retval, nil
|
return &retval, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnionNoFragmentsQuery(
|
// The query or mutation executed by UnionNoFragmentsQuery.
|
||||||
client graphql.Client,
|
const UnionNoFragmentsQueryOperation = `
|
||||||
) (*UnionNoFragmentsQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "UnionNoFragmentsQuery",
|
|
||||||
Query: `
|
|
||||||
query UnionNoFragmentsQuery {
|
query UnionNoFragmentsQuery {
|
||||||
randomLeaf {
|
randomLeaf {
|
||||||
__typename
|
__typename
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func UnionNoFragmentsQuery(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*UnionNoFragmentsQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "UnionNoFragmentsQuery",
|
||||||
|
Query: UnionNoFragmentsQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -62,12 +62,8 @@ func (v *UsesEnumTwiceQueryResponse) GetMe() UsesEnumTwiceQueryMeUser { return v
|
|||||||
// GetOtherUser returns UsesEnumTwiceQueryResponse.OtherUser, and is useful for accessing the field via an interface.
|
// GetOtherUser returns UsesEnumTwiceQueryResponse.OtherUser, and is useful for accessing the field via an interface.
|
||||||
func (v *UsesEnumTwiceQueryResponse) GetOtherUser() UsesEnumTwiceQueryOtherUser { return v.OtherUser }
|
func (v *UsesEnumTwiceQueryResponse) GetOtherUser() UsesEnumTwiceQueryOtherUser { return v.OtherUser }
|
||||||
|
|
||||||
func UsesEnumTwiceQuery(
|
// The query or mutation executed by UsesEnumTwiceQuery.
|
||||||
client graphql.Client,
|
const UsesEnumTwiceQueryOperation = `
|
||||||
) (*UsesEnumTwiceQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "UsesEnumTwiceQuery",
|
|
||||||
Query: `
|
|
||||||
query UsesEnumTwiceQuery {
|
query UsesEnumTwiceQuery {
|
||||||
Me: user {
|
Me: user {
|
||||||
roles
|
roles
|
||||||
@@ -76,7 +72,14 @@ query UsesEnumTwiceQuery {
|
|||||||
roles
|
roles
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func UsesEnumTwiceQuery(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*UsesEnumTwiceQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "UsesEnumTwiceQuery",
|
||||||
|
Query: UsesEnumTwiceQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -177,19 +177,22 @@ type unexportedUser struct {
|
|||||||
// GetId returns unexportedUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns unexportedUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *unexportedUser) GetId() testutil.ID { return v.Id }
|
func (v *unexportedUser) GetId() testutil.ID { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by unexported.
|
||||||
|
const unexportedOperation = `
|
||||||
|
query unexported ($query: UserQueryInput) {
|
||||||
|
user(query: $query) {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func unexported(
|
func unexported(
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
query UserQueryInput,
|
query UserQueryInput,
|
||||||
) (*unexportedResponse, error) {
|
) (*unexportedResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "unexported",
|
OpName: "unexported",
|
||||||
Query: `
|
Query: unexportedOperation,
|
||||||
query unexported ($query: UserQueryInput) {
|
|
||||||
user(query: $query) {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__unexportedInput{
|
Variables: &__unexportedInput{
|
||||||
Query: query,
|
Query: query,
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
+10
-7
@@ -35,18 +35,21 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
func SimpleQuery(
|
// The query or mutation executed by SimpleQuery.
|
||||||
ctx context.Context,
|
const SimpleQueryOperation = `
|
||||||
) (*SimpleQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "SimpleQuery",
|
|
||||||
Query: `
|
|
||||||
query SimpleQuery {
|
query SimpleQuery {
|
||||||
user {
|
user {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func SimpleQuery(
|
||||||
|
ctx context.Context,
|
||||||
|
) (*SimpleQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "SimpleQuery",
|
||||||
|
Query: SimpleQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
var client graphql.Client
|
var client graphql.Client
|
||||||
|
|||||||
+10
-7
@@ -38,18 +38,21 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
func SimpleQuery(
|
// The query or mutation executed by SimpleQuery.
|
||||||
ctx testutil.MyContext,
|
const SimpleQueryOperation = `
|
||||||
) (*SimpleQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "SimpleQuery",
|
|
||||||
Query: `
|
|
||||||
query SimpleQuery {
|
query SimpleQuery {
|
||||||
user {
|
user {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func SimpleQuery(
|
||||||
|
ctx testutil.MyContext,
|
||||||
|
) (*SimpleQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "SimpleQuery",
|
||||||
|
Query: SimpleQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
var client graphql.Client
|
var client graphql.Client
|
||||||
|
|||||||
+8
-5
@@ -33,16 +33,19 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
func SimpleQuery() (*SimpleQueryResponse, error) {
|
// The query or mutation executed by SimpleQuery.
|
||||||
req := &graphql.Request{
|
const SimpleQueryOperation = `
|
||||||
OpName: "SimpleQuery",
|
|
||||||
Query: `
|
|
||||||
query SimpleQuery {
|
query SimpleQuery {
|
||||||
user {
|
user {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func SimpleQuery() (*SimpleQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "SimpleQuery",
|
||||||
|
Query: SimpleQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
var client graphql.Client
|
var client graphql.Client
|
||||||
|
|||||||
Vendored
+10
-7
@@ -38,19 +38,22 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleQuery.
|
||||||
|
const SimpleQueryOperation = `
|
||||||
|
query SimpleQuery {
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
ctx testutil.MyContext,
|
ctx testutil.MyContext,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*SimpleQueryResponse, error) {
|
) (*SimpleQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleQuery",
|
OpName: "SimpleQuery",
|
||||||
Query: `
|
Query: SimpleQueryOperation,
|
||||||
query SimpleQuery {
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -38,19 +38,22 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleQuery.
|
||||||
|
const SimpleQueryOperation = `
|
||||||
|
query SimpleQuery {
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
ctx junkfunname.MyContext,
|
ctx junkfunname.MyContext,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*SimpleQueryResponse, error) {
|
) (*SimpleQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleQuery",
|
OpName: "SimpleQuery",
|
||||||
Query: `
|
Query: SimpleQueryOperation,
|
||||||
query SimpleQuery {
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+10
-7
@@ -34,19 +34,22 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleQuery.
|
||||||
|
const SimpleQueryOperation = `
|
||||||
|
query SimpleQuery {
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*SimpleQueryResponse, error) {
|
) (*SimpleQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleQuery",
|
OpName: "SimpleQuery",
|
||||||
Query: `
|
Query: SimpleQueryOperation,
|
||||||
query SimpleQuery {
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+10
-7
@@ -34,19 +34,22 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleQuery.
|
||||||
|
const SimpleQueryOperation = `
|
||||||
|
query SimpleQuery {
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*SimpleQueryResponse, error) {
|
) (*SimpleQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleQuery",
|
OpName: "SimpleQuery",
|
||||||
Query: `
|
Query: SimpleQueryOperation,
|
||||||
query SimpleQuery {
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+10
-7
@@ -34,19 +34,22 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleQuery.
|
||||||
|
const SimpleQueryOperation = `
|
||||||
|
query SimpleQuery {
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*SimpleQueryResponse, map[string]interface{}, error) {
|
) (*SimpleQueryResponse, map[string]interface{}, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleQuery",
|
OpName: "SimpleQuery",
|
||||||
Query: `
|
Query: SimpleQueryOperation,
|
||||||
query SimpleQuery {
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -32,18 +32,21 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
func SimpleQuery(
|
// The query or mutation executed by SimpleQuery.
|
||||||
client graphql.Client,
|
const SimpleQueryOperation = `
|
||||||
) (*SimpleQueryResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "SimpleQuery",
|
|
||||||
Query: `
|
|
||||||
query SimpleQuery {
|
query SimpleQuery {
|
||||||
user {
|
user {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func SimpleQuery(
|
||||||
|
client graphql.Client,
|
||||||
|
) (*SimpleQueryResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "SimpleQuery",
|
||||||
|
Query: SimpleQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+21
-15
@@ -77,6 +77,15 @@ type __ListInputQueryInput struct {
|
|||||||
// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
|
// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
|
||||||
func (v *__ListInputQueryInput) GetNames() []*string { return v.Names }
|
func (v *__ListInputQueryInput) GetNames() []*string { return v.Names }
|
||||||
|
|
||||||
|
// The query or mutation executed by ListInputQuery.
|
||||||
|
const ListInputQueryOperation = `
|
||||||
|
query ListInputQuery ($names: [String]) {
|
||||||
|
user(query: {names:$names}) {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func ListInputQuery(
|
func ListInputQuery(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
@@ -84,13 +93,7 @@ func ListInputQuery(
|
|||||||
) (*ListInputQueryResponse, error) {
|
) (*ListInputQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "ListInputQuery",
|
OpName: "ListInputQuery",
|
||||||
Query: `
|
Query: ListInputQueryOperation,
|
||||||
query ListInputQuery ($names: [String]) {
|
|
||||||
user(query: {names:$names}) {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__ListInputQueryInput{
|
Variables: &__ListInputQueryInput{
|
||||||
Names: names,
|
Names: names,
|
||||||
},
|
},
|
||||||
@@ -109,13 +112,8 @@ query ListInputQuery ($names: [String]) {
|
|||||||
return &data, err
|
return &data, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func QueryWithSlices(
|
// The query or mutation executed by QueryWithSlices.
|
||||||
ctx context.Context,
|
const QueryWithSlicesOperation = `
|
||||||
client graphql.Client,
|
|
||||||
) (*QueryWithSlicesResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "QueryWithSlices",
|
|
||||||
Query: `
|
|
||||||
query QueryWithSlices {
|
query QueryWithSlices {
|
||||||
user {
|
user {
|
||||||
emails
|
emails
|
||||||
@@ -124,7 +122,15 @@ query QueryWithSlices {
|
|||||||
emailsWithNullsOrNull
|
emailsWithNullsOrNull
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func QueryWithSlices(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
) (*QueryWithSlicesResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "QueryWithSlices",
|
||||||
|
Query: QueryWithSlicesOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+21
-15
@@ -77,6 +77,15 @@ type __ListInputQueryInput struct {
|
|||||||
// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
|
// GetNames returns __ListInputQueryInput.Names, and is useful for accessing the field via an interface.
|
||||||
func (v *__ListInputQueryInput) GetNames() []string { return v.Names }
|
func (v *__ListInputQueryInput) GetNames() []string { return v.Names }
|
||||||
|
|
||||||
|
// The query or mutation executed by ListInputQuery.
|
||||||
|
const ListInputQueryOperation = `
|
||||||
|
query ListInputQuery ($names: [String]) {
|
||||||
|
user(query: {names:$names}) {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func ListInputQuery(
|
func ListInputQuery(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
@@ -84,13 +93,7 @@ func ListInputQuery(
|
|||||||
) (*ListInputQueryResponse, error) {
|
) (*ListInputQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "ListInputQuery",
|
OpName: "ListInputQuery",
|
||||||
Query: `
|
Query: ListInputQueryOperation,
|
||||||
query ListInputQuery ($names: [String]) {
|
|
||||||
user(query: {names:$names}) {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__ListInputQueryInput{
|
Variables: &__ListInputQueryInput{
|
||||||
Names: names,
|
Names: names,
|
||||||
},
|
},
|
||||||
@@ -109,13 +112,8 @@ query ListInputQuery ($names: [String]) {
|
|||||||
return &data, err
|
return &data, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func QueryWithSlices(
|
// The query or mutation executed by QueryWithSlices.
|
||||||
ctx context.Context,
|
const QueryWithSlicesOperation = `
|
||||||
client graphql.Client,
|
|
||||||
) (*QueryWithSlicesResponse, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "QueryWithSlices",
|
|
||||||
Query: `
|
|
||||||
query QueryWithSlices {
|
query QueryWithSlices {
|
||||||
user {
|
user {
|
||||||
emails
|
emails
|
||||||
@@ -124,7 +122,15 @@ query QueryWithSlices {
|
|||||||
emailsWithNullsOrNull
|
emailsWithNullsOrNull
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func QueryWithSlices(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
) (*QueryWithSlicesResponse, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "QueryWithSlices",
|
||||||
|
Query: QueryWithSlicesOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -35,19 +35,22 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() testutil.ID { return v.Id }
|
func (v *SimpleQueryUser) GetId() testutil.ID { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleQuery.
|
||||||
|
const SimpleQueryOperation = `
|
||||||
|
query SimpleQuery {
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*SimpleQueryResponse, error) {
|
) (*SimpleQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleQuery",
|
OpName: "SimpleQuery",
|
||||||
Query: `
|
Query: SimpleQueryOperation,
|
||||||
query SimpleQuery {
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -34,19 +34,22 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleQuery.
|
||||||
|
const SimpleQueryOperation = `
|
||||||
|
query SimpleQuery {
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*SimpleQueryResponse, error) {
|
) (*SimpleQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleQuery",
|
OpName: "SimpleQuery",
|
||||||
Query: `
|
Query: SimpleQueryOperation,
|
||||||
query SimpleQuery {
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -34,19 +34,22 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleQuery.
|
||||||
|
const SimpleQueryOperation = `
|
||||||
|
query SimpleQuery {
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*SimpleQueryResponse, error) {
|
) (*SimpleQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleQuery",
|
OpName: "SimpleQuery",
|
||||||
Query: `
|
Query: SimpleQueryOperation,
|
||||||
query SimpleQuery {
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Vendored
+10
-7
@@ -34,19 +34,22 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleQuery.
|
||||||
|
const SimpleQueryOperation = `
|
||||||
|
query SimpleQuery {
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*SimpleQueryResponse, error) {
|
) (*SimpleQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleQuery",
|
OpName: "SimpleQuery",
|
||||||
Query: `
|
Query: SimpleQueryOperation,
|
||||||
query SimpleQuery {
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
generate/testdata/snapshots/TestGenerateWithConfig-SubpackageConfig-testdata-queries-mypkg-myfile.go
Vendored
+10
-7
@@ -34,19 +34,22 @@ type SimpleQueryUser struct {
|
|||||||
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
// GetId returns SimpleQueryUser.Id, and is useful for accessing the field via an interface.
|
||||||
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
func (v *SimpleQueryUser) GetId() string { return v.Id }
|
||||||
|
|
||||||
|
// The query or mutation executed by SimpleQuery.
|
||||||
|
const SimpleQueryOperation = `
|
||||||
|
query SimpleQuery {
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func SimpleQuery(
|
func SimpleQuery(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
) (*SimpleQueryResponse, error) {
|
) (*SimpleQueryResponse, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "SimpleQuery",
|
OpName: "SimpleQuery",
|
||||||
Query: `
|
Query: SimpleQueryOperation,
|
||||||
query SimpleQuery {
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
+176
-131
@@ -3078,6 +3078,16 @@ type simpleQueryResponse struct {
|
|||||||
// GetMe returns simpleQueryResponse.Me, and is useful for accessing the field via an interface.
|
// GetMe returns simpleQueryResponse.Me, and is useful for accessing the field via an interface.
|
||||||
func (v *simpleQueryResponse) GetMe() simpleQueryMeUser { return v.Me }
|
func (v *simpleQueryResponse) GetMe() simpleQueryMeUser { return v.Me }
|
||||||
|
|
||||||
|
// The query or mutation executed by createUser.
|
||||||
|
const createUserOperation = `
|
||||||
|
mutation createUser ($user: NewUser!) {
|
||||||
|
createUser(input: $user) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func createUser(
|
func createUser(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
@@ -3085,14 +3095,7 @@ func createUser(
|
|||||||
) (*createUserResponse, map[string]interface{}, error) {
|
) (*createUserResponse, map[string]interface{}, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "createUser",
|
OpName: "createUser",
|
||||||
Query: `
|
Query: createUserOperation,
|
||||||
mutation createUser ($user: NewUser!) {
|
|
||||||
createUser(input: $user) {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__createUserInput{
|
Variables: &__createUserInput{
|
||||||
User: user,
|
User: user,
|
||||||
},
|
},
|
||||||
@@ -3111,20 +3114,23 @@ mutation createUser ($user: NewUser!) {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func failingQuery(
|
// The query or mutation executed by failingQuery.
|
||||||
ctx context.Context,
|
const failingQueryOperation = `
|
||||||
client graphql.Client,
|
|
||||||
) (*failingQueryResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "failingQuery",
|
|
||||||
Query: `
|
|
||||||
query failingQuery {
|
query failingQuery {
|
||||||
fail
|
fail
|
||||||
me {
|
me {
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func failingQuery(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
) (*failingQueryResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "failingQuery",
|
||||||
|
Query: failingQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
@@ -3140,14 +3146,8 @@ query failingQuery {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryWithCustomMarshal(
|
// The query or mutation executed by queryWithCustomMarshal.
|
||||||
ctx context.Context,
|
const queryWithCustomMarshalOperation = `
|
||||||
client graphql.Client,
|
|
||||||
date time.Time,
|
|
||||||
) (*queryWithCustomMarshalResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "queryWithCustomMarshal",
|
|
||||||
Query: `
|
|
||||||
query queryWithCustomMarshal ($date: Date!) {
|
query queryWithCustomMarshal ($date: Date!) {
|
||||||
usersBornOn(date: $date) {
|
usersBornOn(date: $date) {
|
||||||
id
|
id
|
||||||
@@ -3155,7 +3155,16 @@ query queryWithCustomMarshal ($date: Date!) {
|
|||||||
birthdate
|
birthdate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func queryWithCustomMarshal(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
date time.Time,
|
||||||
|
) (*queryWithCustomMarshalResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "queryWithCustomMarshal",
|
||||||
|
Query: queryWithCustomMarshalOperation,
|
||||||
Variables: &__queryWithCustomMarshalInput{
|
Variables: &__queryWithCustomMarshalInput{
|
||||||
Date: date,
|
Date: date,
|
||||||
},
|
},
|
||||||
@@ -3174,6 +3183,17 @@ query queryWithCustomMarshal ($date: Date!) {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The query or mutation executed by queryWithCustomMarshalOptional.
|
||||||
|
const queryWithCustomMarshalOptionalOperation = `
|
||||||
|
query queryWithCustomMarshalOptional ($date: Date, $id: ID) {
|
||||||
|
userSearch(birthdate: $date, id: $id) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
birthdate
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
func queryWithCustomMarshalOptional(
|
func queryWithCustomMarshalOptional(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
client graphql.Client,
|
client graphql.Client,
|
||||||
@@ -3182,15 +3202,7 @@ func queryWithCustomMarshalOptional(
|
|||||||
) (*queryWithCustomMarshalOptionalResponse, map[string]interface{}, error) {
|
) (*queryWithCustomMarshalOptionalResponse, map[string]interface{}, error) {
|
||||||
req := &graphql.Request{
|
req := &graphql.Request{
|
||||||
OpName: "queryWithCustomMarshalOptional",
|
OpName: "queryWithCustomMarshalOptional",
|
||||||
Query: `
|
Query: queryWithCustomMarshalOptionalOperation,
|
||||||
query queryWithCustomMarshalOptional ($date: Date, $id: ID) {
|
|
||||||
userSearch(birthdate: $date, id: $id) {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
birthdate
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Variables: &__queryWithCustomMarshalOptionalInput{
|
Variables: &__queryWithCustomMarshalOptionalInput{
|
||||||
Date: date,
|
Date: date,
|
||||||
Id: id,
|
Id: id,
|
||||||
@@ -3210,14 +3222,8 @@ query queryWithCustomMarshalOptional ($date: Date, $id: ID) {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryWithCustomMarshalSlice(
|
// The query or mutation executed by queryWithCustomMarshalSlice.
|
||||||
ctx context.Context,
|
const queryWithCustomMarshalSliceOperation = `
|
||||||
client graphql.Client,
|
|
||||||
dates []time.Time,
|
|
||||||
) (*queryWithCustomMarshalSliceResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "queryWithCustomMarshalSlice",
|
|
||||||
Query: `
|
|
||||||
query queryWithCustomMarshalSlice ($dates: [Date!]!) {
|
query queryWithCustomMarshalSlice ($dates: [Date!]!) {
|
||||||
usersBornOnDates(dates: $dates) {
|
usersBornOnDates(dates: $dates) {
|
||||||
id
|
id
|
||||||
@@ -3225,7 +3231,16 @@ query queryWithCustomMarshalSlice ($dates: [Date!]!) {
|
|||||||
birthdate
|
birthdate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func queryWithCustomMarshalSlice(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
dates []time.Time,
|
||||||
|
) (*queryWithCustomMarshalSliceResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "queryWithCustomMarshalSlice",
|
||||||
|
Query: queryWithCustomMarshalSliceOperation,
|
||||||
Variables: &__queryWithCustomMarshalSliceInput{
|
Variables: &__queryWithCustomMarshalSliceInput{
|
||||||
Dates: dates,
|
Dates: dates,
|
||||||
},
|
},
|
||||||
@@ -3244,14 +3259,8 @@ query queryWithCustomMarshalSlice ($dates: [Date!]!) {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryWithFlatten(
|
// The query or mutation executed by queryWithFlatten.
|
||||||
ctx context.Context,
|
const queryWithFlattenOperation = `
|
||||||
client graphql.Client,
|
|
||||||
ids []string,
|
|
||||||
) (*QueryFragment, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "queryWithFlatten",
|
|
||||||
Query: `
|
|
||||||
query queryWithFlatten ($ids: [ID!]!) {
|
query queryWithFlatten ($ids: [ID!]!) {
|
||||||
... QueryFragment
|
... QueryFragment
|
||||||
}
|
}
|
||||||
@@ -3293,7 +3302,16 @@ fragment FriendsFields on User {
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func queryWithFlatten(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
ids []string,
|
||||||
|
) (*QueryFragment, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "queryWithFlatten",
|
||||||
|
Query: queryWithFlattenOperation,
|
||||||
Variables: &__queryWithFlattenInput{
|
Variables: &__queryWithFlattenInput{
|
||||||
Ids: ids,
|
Ids: ids,
|
||||||
},
|
},
|
||||||
@@ -3312,14 +3330,8 @@ fragment FriendsFields on User {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryWithFragments(
|
// The query or mutation executed by queryWithFragments.
|
||||||
ctx context.Context,
|
const queryWithFragmentsOperation = `
|
||||||
client graphql.Client,
|
|
||||||
ids []string,
|
|
||||||
) (*queryWithFragmentsResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "queryWithFragments",
|
|
||||||
Query: `
|
|
||||||
query queryWithFragments ($ids: [ID!]!) {
|
query queryWithFragments ($ids: [ID!]!) {
|
||||||
beings(ids: $ids) {
|
beings(ids: $ids) {
|
||||||
__typename
|
__typename
|
||||||
@@ -3355,7 +3367,16 @@ query queryWithFragments ($ids: [ID!]!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func queryWithFragments(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
ids []string,
|
||||||
|
) (*queryWithFragmentsResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "queryWithFragments",
|
||||||
|
Query: queryWithFragmentsOperation,
|
||||||
Variables: &__queryWithFragmentsInput{
|
Variables: &__queryWithFragmentsInput{
|
||||||
Ids: ids,
|
Ids: ids,
|
||||||
},
|
},
|
||||||
@@ -3374,14 +3395,8 @@ query queryWithFragments ($ids: [ID!]!) {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryWithInterfaceListField(
|
// The query or mutation executed by queryWithInterfaceListField.
|
||||||
ctx context.Context,
|
const queryWithInterfaceListFieldOperation = `
|
||||||
client graphql.Client,
|
|
||||||
ids []string,
|
|
||||||
) (*queryWithInterfaceListFieldResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "queryWithInterfaceListField",
|
|
||||||
Query: `
|
|
||||||
query queryWithInterfaceListField ($ids: [ID!]!) {
|
query queryWithInterfaceListField ($ids: [ID!]!) {
|
||||||
beings(ids: $ids) {
|
beings(ids: $ids) {
|
||||||
__typename
|
__typename
|
||||||
@@ -3389,7 +3404,16 @@ query queryWithInterfaceListField ($ids: [ID!]!) {
|
|||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func queryWithInterfaceListField(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
ids []string,
|
||||||
|
) (*queryWithInterfaceListFieldResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "queryWithInterfaceListField",
|
||||||
|
Query: queryWithInterfaceListFieldOperation,
|
||||||
Variables: &__queryWithInterfaceListFieldInput{
|
Variables: &__queryWithInterfaceListFieldInput{
|
||||||
Ids: ids,
|
Ids: ids,
|
||||||
},
|
},
|
||||||
@@ -3408,14 +3432,8 @@ query queryWithInterfaceListField ($ids: [ID!]!) {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryWithInterfaceListPointerField(
|
// The query or mutation executed by queryWithInterfaceListPointerField.
|
||||||
ctx context.Context,
|
const queryWithInterfaceListPointerFieldOperation = `
|
||||||
client graphql.Client,
|
|
||||||
ids []string,
|
|
||||||
) (*queryWithInterfaceListPointerFieldResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "queryWithInterfaceListPointerField",
|
|
||||||
Query: `
|
|
||||||
query queryWithInterfaceListPointerField ($ids: [ID!]!) {
|
query queryWithInterfaceListPointerField ($ids: [ID!]!) {
|
||||||
beings(ids: $ids) {
|
beings(ids: $ids) {
|
||||||
__typename
|
__typename
|
||||||
@@ -3423,7 +3441,16 @@ query queryWithInterfaceListPointerField ($ids: [ID!]!) {
|
|||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func queryWithInterfaceListPointerField(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
ids []string,
|
||||||
|
) (*queryWithInterfaceListPointerFieldResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "queryWithInterfaceListPointerField",
|
||||||
|
Query: queryWithInterfaceListPointerFieldOperation,
|
||||||
Variables: &__queryWithInterfaceListPointerFieldInput{
|
Variables: &__queryWithInterfaceListPointerFieldInput{
|
||||||
Ids: ids,
|
Ids: ids,
|
||||||
},
|
},
|
||||||
@@ -3442,14 +3469,8 @@ query queryWithInterfaceListPointerField ($ids: [ID!]!) {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryWithInterfaceNoFragments(
|
// The query or mutation executed by queryWithInterfaceNoFragments.
|
||||||
ctx context.Context,
|
const queryWithInterfaceNoFragmentsOperation = `
|
||||||
client graphql.Client,
|
|
||||||
id string,
|
|
||||||
) (*queryWithInterfaceNoFragmentsResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "queryWithInterfaceNoFragments",
|
|
||||||
Query: `
|
|
||||||
query queryWithInterfaceNoFragments ($id: ID!) {
|
query queryWithInterfaceNoFragments ($id: ID!) {
|
||||||
being(id: $id) {
|
being(id: $id) {
|
||||||
__typename
|
__typename
|
||||||
@@ -3461,7 +3482,16 @@ query queryWithInterfaceNoFragments ($id: ID!) {
|
|||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func queryWithInterfaceNoFragments(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
id string,
|
||||||
|
) (*queryWithInterfaceNoFragmentsResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "queryWithInterfaceNoFragments",
|
||||||
|
Query: queryWithInterfaceNoFragmentsOperation,
|
||||||
Variables: &__queryWithInterfaceNoFragmentsInput{
|
Variables: &__queryWithInterfaceNoFragmentsInput{
|
||||||
Id: id,
|
Id: id,
|
||||||
},
|
},
|
||||||
@@ -3480,14 +3510,8 @@ query queryWithInterfaceNoFragments ($id: ID!) {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryWithNamedFragments(
|
// The query or mutation executed by queryWithNamedFragments.
|
||||||
ctx context.Context,
|
const queryWithNamedFragmentsOperation = `
|
||||||
client graphql.Client,
|
|
||||||
ids []string,
|
|
||||||
) (*queryWithNamedFragmentsResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "queryWithNamedFragments",
|
|
||||||
Query: `
|
|
||||||
query queryWithNamedFragments ($ids: [ID!]!) {
|
query queryWithNamedFragments ($ids: [ID!]!) {
|
||||||
beings(ids: $ids) {
|
beings(ids: $ids) {
|
||||||
__typename
|
__typename
|
||||||
@@ -3523,7 +3547,16 @@ fragment MoreUserFields on User {
|
|||||||
color
|
color
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func queryWithNamedFragments(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
ids []string,
|
||||||
|
) (*queryWithNamedFragmentsResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "queryWithNamedFragments",
|
||||||
|
Query: queryWithNamedFragmentsOperation,
|
||||||
Variables: &__queryWithNamedFragmentsInput{
|
Variables: &__queryWithNamedFragmentsInput{
|
||||||
Ids: ids,
|
Ids: ids,
|
||||||
},
|
},
|
||||||
@@ -3542,14 +3575,8 @@ fragment MoreUserFields on User {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryWithOmitempty(
|
// The query or mutation executed by queryWithOmitempty.
|
||||||
ctx context.Context,
|
const queryWithOmitemptyOperation = `
|
||||||
client graphql.Client,
|
|
||||||
id string,
|
|
||||||
) (*queryWithOmitemptyResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "queryWithOmitempty",
|
|
||||||
Query: `
|
|
||||||
query queryWithOmitempty ($id: ID) {
|
query queryWithOmitempty ($id: ID) {
|
||||||
user(id: $id) {
|
user(id: $id) {
|
||||||
id
|
id
|
||||||
@@ -3557,7 +3584,16 @@ query queryWithOmitempty ($id: ID) {
|
|||||||
luckyNumber
|
luckyNumber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func queryWithOmitempty(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
id string,
|
||||||
|
) (*queryWithOmitemptyResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "queryWithOmitempty",
|
||||||
|
Query: queryWithOmitemptyOperation,
|
||||||
Variables: &__queryWithOmitemptyInput{
|
Variables: &__queryWithOmitemptyInput{
|
||||||
Id: id,
|
Id: id,
|
||||||
},
|
},
|
||||||
@@ -3576,14 +3612,8 @@ query queryWithOmitempty ($id: ID) {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func queryWithVariables(
|
// The query or mutation executed by queryWithVariables.
|
||||||
ctx context.Context,
|
const queryWithVariablesOperation = `
|
||||||
client graphql.Client,
|
|
||||||
id string,
|
|
||||||
) (*queryWithVariablesResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "queryWithVariables",
|
|
||||||
Query: `
|
|
||||||
query queryWithVariables ($id: ID!) {
|
query queryWithVariables ($id: ID!) {
|
||||||
user(id: $id) {
|
user(id: $id) {
|
||||||
id
|
id
|
||||||
@@ -3591,7 +3621,16 @@ query queryWithVariables ($id: ID!) {
|
|||||||
luckyNumber
|
luckyNumber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func queryWithVariables(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
id string,
|
||||||
|
) (*queryWithVariablesResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "queryWithVariables",
|
||||||
|
Query: queryWithVariablesOperation,
|
||||||
Variables: &__queryWithVariablesInput{
|
Variables: &__queryWithVariablesInput{
|
||||||
Id: id,
|
Id: id,
|
||||||
},
|
},
|
||||||
@@ -3610,13 +3649,8 @@ query queryWithVariables ($id: ID!) {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func simpleQuery(
|
// The query or mutation executed by simpleQuery.
|
||||||
ctx context.Context,
|
const simpleQueryOperation = `
|
||||||
client graphql.Client,
|
|
||||||
) (*simpleQueryResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "simpleQuery",
|
|
||||||
Query: `
|
|
||||||
query simpleQuery {
|
query simpleQuery {
|
||||||
me {
|
me {
|
||||||
id
|
id
|
||||||
@@ -3624,7 +3658,15 @@ query simpleQuery {
|
|||||||
luckyNumber
|
luckyNumber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func simpleQuery(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
) (*simpleQueryResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "simpleQuery",
|
||||||
|
Query: simpleQueryOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
@@ -3640,13 +3682,8 @@ query simpleQuery {
|
|||||||
return &data, resp.Extensions, err
|
return &data, resp.Extensions, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func simpleQueryExt(
|
// The query or mutation executed by simpleQueryExt.
|
||||||
ctx context.Context,
|
const simpleQueryExtOperation = `
|
||||||
client graphql.Client,
|
|
||||||
) (*simpleQueryExtResponse, map[string]interface{}, error) {
|
|
||||||
req := &graphql.Request{
|
|
||||||
OpName: "simpleQueryExt",
|
|
||||||
Query: `
|
|
||||||
query simpleQueryExt {
|
query simpleQueryExt {
|
||||||
me {
|
me {
|
||||||
id
|
id
|
||||||
@@ -3654,7 +3691,15 @@ query simpleQueryExt {
|
|||||||
luckyNumber
|
luckyNumber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`,
|
`
|
||||||
|
|
||||||
|
func simpleQueryExt(
|
||||||
|
ctx context.Context,
|
||||||
|
client graphql.Client,
|
||||||
|
) (*simpleQueryExtResponse, map[string]interface{}, error) {
|
||||||
|
req := &graphql.Request{
|
||||||
|
OpName: "simpleQueryExt",
|
||||||
|
Query: simpleQueryExtOperation,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user