Skip to content

Commit 2a6b3a9

Browse files
rarguelloFkakkoyundarccio
authored
[v1] Span Events native support and graphql error reporting (#3176)
Co-authored-by: Kemal Akkoyun <[email protected]> Co-authored-by: Dario Castañé <[email protected]>
1 parent 67026ce commit 2a6b3a9

34 files changed

+5443
-46
lines changed
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Where are all the schema files located? globs are supported eg src/**/*.graphqls
2+
schema:
3+
- graph/*.graphqls
4+
5+
# Where should the generated server code go?
6+
exec:
7+
package: graph
8+
layout: single-file # Only other option is "follow-schema," ie multi-file.
9+
10+
# Only for single-file layout:
11+
filename: graph/generated.go
12+
13+
# Only for follow-schema layout:
14+
# dir: graph
15+
# filename_template: "{name}.generated.go"
16+
17+
# Optional: Maximum number of goroutines in concurrency to use per child resolvers(default: unlimited)
18+
# worker_limit: 1000
19+
20+
# Uncomment to enable federation
21+
# federation:
22+
# filename: graph/federation.go
23+
# package: graph
24+
# version: 2
25+
# options:
26+
# computed_requires: true
27+
28+
# Where should any generated models go?
29+
model:
30+
filename: graph/model/models_gen.go
31+
package: model
32+
33+
# Optional: Pass in a path to a new gotpl template to use for generating the models
34+
# model_template: [your/path/model.gotpl]
35+
36+
# Where should the resolver implementations go?
37+
resolver:
38+
package: graph
39+
layout: follow-schema # Only other option is "single-file."
40+
41+
# Only for single-file layout:
42+
# filename: graph/resolver.go
43+
44+
# Only for follow-schema layout:
45+
dir: graph
46+
filename_template: "{name}.resolvers.go"
47+
48+
# Optional: turn on to not generate template comments above resolvers
49+
# omit_template_comment: false
50+
# Optional: Pass in a path to a new gotpl template to use for generating resolvers
51+
# resolver_template: [your/path/resolver.gotpl]
52+
# Optional: turn on to avoid rewriting existing resolver(s) when generating
53+
# preserve_resolver: false
54+
55+
# Optional: turn on use ` + "`" + `gqlgen:"fieldName"` + "`" + ` tags in your models
56+
# struct_tag: json
57+
58+
# Optional: turn on to use []Thing instead of []*Thing
59+
# omit_slice_element_pointers: false
60+
61+
# Optional: turn on to omit Is<Name>() methods to interface and unions
62+
# omit_interface_checks: true
63+
64+
# Optional: turn on to skip generation of ComplexityRoot struct content and Complexity function
65+
# omit_complexity: false
66+
67+
# Optional: turn on to not generate any file notice comments in generated files
68+
# omit_gqlgen_file_notice: false
69+
70+
# Optional: turn on to exclude the gqlgen version in the generated file notice. No effect if `omit_gqlgen_file_notice` is true.
71+
# omit_gqlgen_version_in_file_notice: false
72+
73+
# Optional: turn on to exclude root models such as Query and Mutation from the generated models file.
74+
# omit_root_models: false
75+
76+
# Optional: turn on to exclude resolver fields from the generated models file.
77+
# omit_resolver_fields: false
78+
79+
# Optional: turn off to make struct-type struct fields not use pointers
80+
# e.g. type Thing struct { FieldA OtherThing } instead of { FieldA *OtherThing }
81+
# struct_fields_always_pointers: true
82+
83+
# Optional: turn off to make resolvers return values instead of pointers for structs
84+
# resolvers_always_return_pointers: true
85+
86+
# Optional: turn on to return pointers instead of values in unmarshalInput
87+
# return_pointers_in_unmarshalinput: false
88+
89+
# Optional: wrap nullable input fields with Omittable
90+
# nullable_input_omittable: true
91+
92+
# Optional: set to speed up generation time by not performing a final validation pass.
93+
# skip_validation: true
94+
95+
# Optional: set to skip running `go mod tidy` when generating server code
96+
# skip_mod_tidy: true
97+
98+
# Optional: if this is set to true, argument directives that
99+
# decorate a field with a null value will still be called.
100+
#
101+
# This enables argumment directives to not just mutate
102+
# argument values but to set them even if they're null.
103+
call_argument_directives_with_null: true
104+
105+
# Optional: set build tags that will be used to load packages
106+
# go_build_tags:
107+
# - private
108+
# - enterprise
109+
110+
# Optional: set to modify the initialisms regarded for Go names
111+
# go_initialisms:
112+
# replace_defaults: false # if true, the default initialisms will get dropped in favor of the new ones instead of being added
113+
# initialisms: # List of initialisms to for Go names
114+
# - 'CC'
115+
# - 'BCC'
116+
117+
# gqlgen will search for any type names in the schema in these go packages
118+
# if they match it will use them, otherwise it will generate them.
119+
autobind:
120+
# - "gopkg.in/DataDog/dd-trace-go.v1/contrib/99designs/gqlgen/internal/testserver/graph/model"
121+
122+
# This section declares type mapping between the GraphQL and go type systems
123+
#
124+
# The first line in each type will be used as defaults for resolver arguments and
125+
# modelgen, the others will be allowed when binding to fields. Configure them to
126+
# your liking
127+
models:
128+
ID:
129+
model:
130+
- github.com/99designs/gqlgen/graphql.ID
131+
- github.com/99designs/gqlgen/graphql.Int
132+
- github.com/99designs/gqlgen/graphql.Int64
133+
- github.com/99designs/gqlgen/graphql.Int32
134+
# gqlgen provides a default GraphQL UUID convenience wrapper for github.com/google/uuid
135+
# but you can override this to provide your own GraphQL UUID implementation
136+
UUID:
137+
model:
138+
- github.com/99designs/gqlgen/graphql.UUID
139+
140+
# The GraphQL spec explicitly states that the Int type is a signed 32-bit
141+
# integer. Using Go int or int64 to represent it can lead to unexpected
142+
# behavior, and some GraphQL tools like Apollo Router will fail when
143+
# communicating numbers that overflow 32-bits.
144+
#
145+
# You may choose to use the custom, built-in Int64 scalar to represent 64-bit
146+
# integers, or ignore the spec and bind Int to graphql.Int / graphql.Int64
147+
# (the default behavior of gqlgen). This is fine in simple use cases when you
148+
# do not need to worry about interoperability and only expect small numbers.
149+
Int:
150+
model:
151+
- github.com/99designs/gqlgen/graphql.Int32
152+
Int64:
153+
model:
154+
- github.com/99designs/gqlgen/graphql.Int
155+
- github.com/99designs/gqlgen/graphql.Int64

0 commit comments

Comments
 (0)