Skip to content

Commit

Permalink
corrected template invocation for queryDirectives and other minor tem…
Browse files Browse the repository at this point in the history
…plate changes
  • Loading branch information
kanodia-parag committed Nov 26, 2024
1 parent e5ce419 commit ba9eece
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions codegen/directives.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func _queryMiddleware(ctx context.Context, ec *executionContext, obj *ast.Operat
{{- else -}}
func (ec *executionContext) _queryMiddleware(ctx context.Context, obj *ast.OperationDefinition, next func(ctx context.Context) (interface{}, error)) graphql.Marshaler {
{{- end }}
{{ template "queryDirectives" (dict "DirectiveList" .Directives.LocationDirectives "Type" "QUERY" "UseFunctionSyntaxForExecutionContext" $useFunctionSyntaxForExecutionContext) }}
{{ template "queryDirectives" (dict "DirectiveList" (.Directives.LocationDirectives "QUERY") "UseFunctionSyntaxForExecutionContext" $useFunctionSyntaxForExecutionContext) }}
}
{{ end }}

Expand All @@ -102,7 +102,7 @@ func _mutationMiddleware(ctx context.Context, ec *executionContext, obj *ast.Ope
{{- else -}}
func (ec *executionContext) _mutationMiddleware(ctx context.Context, obj *ast.OperationDefinition, next func(ctx context.Context) (interface{}, error)) graphql.Marshaler {
{{- end }}
{{ template "queryDirectives" (dict "DirectiveList" .Directives.LocationDirectives "Type" "MUTATION" "UseFunctionSyntaxForExecutionContext" $useFunctionSyntaxForExecutionContext) }}
{{ template "queryDirectives" (dict "DirectiveList" (.Directives.LocationDirectives "MUTATION") "UseFunctionSyntaxForExecutionContext" $useFunctionSyntaxForExecutionContext) }}
}
{{ end }}

Expand Down
2 changes: 1 addition & 1 deletion codegen/type.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
return _{{$type.Definition.Name}}(ctx, ec, sel)
{{- else -}}
return ec._{{$type.Definition.Name}}(ctx, sel)
{{ end }}
{{- end }}
{{- end }}
{{- else }}
{{ if $useFunctionSyntaxForExecutionContext -}}
Expand Down
1 change: 0 additions & 1 deletion integration/server/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba9eece

Please sign in to comment.