INNER CODE UNIT · Go

Gql__interface_

ysugimoto/grpc-graphql-gateway · protoc-gen-graphql/template.go:65

func Gql__interface_{{ .TypeName }}() *graphql.Interface {
	if gql__interface_{{ .TypeName }} == nil {
		gql__interface_{{ .TypeName }} =  graphql.NewInterface(graphql.InterfaceConfig{
			Name: "{{ $.RootPackage.CamelName }}_Interface_{{ .TypeName }}",
			{{- if .Comment }}
			Description: ` + "`" + `{{ .Comment }}` + "`" + `,
			{{- end }}
			Fields: graphql.Fields{
{{- range .Fields }}
			{{- if not .IsCyclic }}
				"{{ .FieldName }}": &graphql.Field{
					Type: {{ .FieldType $.RootPackage.Name }},
					{{- if .Comment }}
					Description: ` + "`" + `{{ .Comment }}` + "`" + `,
					{{- end }}
				},
			{{- end }}
{{- end }}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…