Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/Khan/genqlient
/ functions
Functions
2,231 in github.com/Khan/genqlient
⨍
Functions
2,231
◇
Types & classes
661
↓ 176 callers
Method
Error
Error implements the error interface for HTTPError.
graphql/errors.go:15
↓ 102 callers
Method
MakeRequest
MakeRequest must make a request to the client's GraphQL API. ctx is the context that should be used to make this request. If context is disabled in
graphql/client.go:36
↓ 102 callers
Function
errorf
(pos *ast.Position, msg string, args ...interface{})
generate/errors.go:62
↓ 32 callers
Method
Close
()
graphql/client.go:194
↓ 20 callers
Function
fakeField
(containingTypeName, fieldName string)
generate/names_test.go:9
↓ 19 callers
Function
MarshalDate
(t *time.Time)
internal/testutil/types.go:34
↓ 19 callers
Function
UnmarshalDate
(b []byte, t *time.Time)
internal/testutil/types.go:47
↓ 17 callers
Function
RunServer
()
internal/integration/server/server.go:216
↓ 15 callers
Method
GetId
GetId returns the interface-field "id" from its implementation.
internal/integration/generated.go:296
↓ 14 callers
Method
Reference
Reference returns the Go name of this type, e.g. []*MyStruct, and may be used to refer to it in Go code.
generate/types.go:26
↓ 14 callers
Function
newRoundtripClients
(t *testing.T, endpoint string)
internal/integration/roundtrip.go:125
↓ 13 callers
Method
__premarshalJSON
()
generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go:576
↓ 13 callers
Method
__premarshalJSON
()
generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go:2522
↓ 12 callers
Method
GetTypename
GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
internal/integration/generated.go:129
↓ 12 callers
Method
marshalOString2ᚖstring
(ctx context.Context, sel ast.SelectionSet, v *string)
internal/integration/server/gqlgen_exec.go:5697
↓ 12 callers
Method
processDeferredGroup
(dg graphql.DeferredGroup)
internal/integration/server/gqlgen_exec.go:447
↓ 11 callers
Method
fieldContext___Type_description
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3756
↓ 11 callers
Method
fieldContext___Type_enumValues
(ctx context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3989
↓ 11 callers
Method
fieldContext___Type_fields
(ctx context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3797
↓ 11 callers
Method
fieldContext___Type_inputFields
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:4051
↓ 11 callers
Method
fieldContext___Type_kind
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3674
↓ 11 callers
Method
fieldContext___Type_name
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3715
↓ 11 callers
Method
fieldContext___Type_specifiedByURL
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:4165
↓ 10 callers
Method
Error
()
generate/errors.go:50
↓ 10 callers
Method
Query
()
internal/integration/server/gqlgen_exec.go:42
↓ 10 callers
Method
fieldContext___Type_interfaces
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3863
↓ 10 callers
Method
fieldContext___Type_ofType
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:4102
↓ 10 callers
Method
fieldContext___Type_possibleTypes
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3926
↓ 9 callers
Method
GetName
GetName returns the interface-field "name" from its implementation.
internal/integration/generated.go:298
↓ 9 callers
Method
Unwrap
Remove slice/pointer wrappers, and return the underlying (named (or builtin)) type. For example, given []*MyStruct, return MyStruct.
generate/types.go:40
↓ 9 callers
Function
__marshalContentFieldsNextContent
(v *ContentFieldsNextContent)
generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go:301
↓ 9 callers
Function
__marshalContentFieldsRelatedContent
(v *ContentFieldsRelatedContent)
generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go:432
↓ 8 callers
Function
ApplyCasing
ApplyCasing applies a specific casing algorithm to a string. It handles the different casing transformations based on the algorithm. The forceUpperFir
generate/util.go:75
↓ 8 callers
Method
__premarshalJSON
()
internal/integration/generated.go:998
↓ 8 callers
Method
fieldContext_User_birthdate
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:2295
↓ 8 callers
Method
fieldContext_User_greatScalar
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:2396
↓ 8 callers
Method
fieldContext_User_hair
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:2250
↓ 8 callers
Method
fieldContext_User_id
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:2124
↓ 8 callers
Method
fieldContext_User_luckyNumber
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:2209
↓ 8 callers
Method
fieldContext_User_name
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:2168
↓ 8 callers
Function
newPrefixList
creates a new one-element list
generate/names.go:121
↓ 7 callers
Method
GetDefaultCasingAlgorithm
GetDefaultCasingAlgorithm returns the default casing algorithm for the config.
generate/config.go:389
↓ 7 callers
Method
MarshalGQL
(w io.Writer)
internal/integration/server/gqlgen_models.go:109
↓ 7 callers
Method
String
()
generate/errors.go:21
↓ 7 callers
Method
_User
(ctx context.Context, sel ast.SelectionSet, obj *User)
internal/integration/server/gqlgen_exec.go:4687
↓ 7 callers
Method
addType
addType inserts the type into g.typeMap, checking for conflicts. The conflict-checking is as described in getType. Note we have to do it here again,
generate/convert.go:65
↓ 7 callers
Method
fieldContext_User_friends
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:2339
↓ 7 callers
Method
ref
ref takes a Go fully-qualified name, ensures that any necessary symbols are imported, and returns an appropriate reference. Ideally, we want to allow
generate/imports.go:80
↓ 7 callers
Function
writeDescription
(w io.Writer, desc string)
generate/types.go:575
↓ 6 callers
Method
Description
()
generate/main.go:64
↓ 6 callers
Method
GraphQLTypeName
GraphQLTypeName returns the name of the GraphQL type to which this Go type corresponds.
generate/types.go:30
↓ 6 callers
Function
ReadAndValidateConfig
ReadAndValidateConfig reads the configuration from the given file, validates it, and returns it.
generate/config.go:318
↓ 6 callers
Method
convertSelectionSet
convertSelectionSet converts a GraphQL selection-set into a list of corresponding Go struct-fields (and their Go types) A selection-set is a list of
generate/convert.go:592
↓ 6 callers
Method
marshalNString2string
(ctx context.Context, sel ast.SelectionSet, v string)
internal/integration/server/gqlgen_exec.go:5250
↓ 6 callers
Method
render
render executes the given template with the funcs from this generator.
generate/template.go:32
↓ 5 callers
Function
Generate
Generate is the main programmatic entrypoint to genqlient, and generates and returns Go source code based on the given configuration. See [Config] fo
generate/generate.go:321
↓ 5 callers
Method
SelectionSet
SelectionSet returns the selection-set of the GraphQL field from which this type was generated, or nil if none is applicable (for GraphQL scalar, enum
generate/types.go:36
↓ 5 callers
Method
parsePrecedingComment
parsePrecedingComment looks at the comment right before this node, and returns the genqlient directive applied to it (or an empty one if there is none
generate/genqlient_directive.go:465
↓ 5 callers
Function
pathJoin
pathJoin is like filepath.Join but 1) it only takes two argsuments, and b) if the second argument is an absolute path the first argument is ignored (s
generate/config.go:137
↓ 5 callers
Function
userByID
(id string)
internal/integration/server/server.go:45
↓ 5 callers
Function
validateFlattenOption
( typ *ast.Definition, selectionSet ast.SelectionSet, pos *ast.Position, )
generate/genqlient_directive.go:332
↓ 4 callers
Method
GetFlatten
()
generate/genqlient_directive.go:78
↓ 4 callers
Method
GetOmitempty
()
generate/genqlient_directive.go:74
↓ 4 callers
Function
NewClient
NewClient returns a [Client] which makes requests to the given endpoint, suitable for most users. The client makes POST requests to the given GraphQL
graphql/client.go:104
↓ 4 callers
Method
Subscribe
Subscribe must subscribe to an endpoint of the client's GraphQL API. req contains the data to be sent to the GraphQL server. Will be marshalled into
graphql/client.go:69
↓ 4 callers
Method
Unsubscribe
Unsubscribe must unsubscribe from an endpoint of the client's GraphQL API.
graphql/client.go:76
↓ 4 callers
Method
fieldContext___InputValue_defaultValue
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3275
↓ 4 callers
Method
fieldContext___InputValue_description
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3168
↓ 4 callers
Method
fieldContext___InputValue_name
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3127
↓ 4 callers
Method
fieldContext___InputValue_type
(_ context.Context, field graphql.CollectedField)
internal/integration/server/gqlgen_exec.go:3212
↓ 4 callers
Function
fillDefaultBool
(target **bool, defaults ...*bool)
generate/genqlient_directive.go:384
↓ 4 callers
Function
makeTypeName
Given a prefix-list, and the GraphQL of the current type, compute the name we should give it in Go.
generate/names.go:170
↓ 4 callers
Method
marshalNBoolean2bool
(ctx context.Context, sel ast.SelectionSet, v bool)
internal/integration/server/gqlgen_exec.go:5111
↓ 4 callers
Method
marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType
(ctx context.Context, sel ast.SelectionSet, v *introspection.Type)
internal/integration/server/gqlgen_exec.go:5948
↓ 4 callers
Function
nextPrefix
Given a prefix-list, and a field, compute the next prefix-list, which will be used for that field's selections.
generate/names.go:159
↓ 4 callers
Function
setBool
(optionName string, dst **bool, v *ast.Value, pos *ast.Position)
generate/genqlient_directive.go:80
↓ 4 callers
Function
setString
(optionName string, dst *string, v *ast.Value, pos *ast.Position)
generate/genqlient_directive.go:95
↓ 4 callers
Function
strptr
(v string)
internal/integration/server/server.go:16
↓ 4 callers
Function
warn
TODO(benkraft): Make this mockable for tests?
generate/main.go:18
↓ 3 callers
Method
IsEmbedded
IsEmbedded returns true if this field is embedded (a.k.a. anonymous), which is in practice true if it corresponds to a named fragment spread in GraphQ
generate/types.go:193
↓ 3 callers
Method
Schema
()
internal/integration/server/gqlgen_exec.go:124
↓ 3 callers
Method
Start
Start must open a webSocket connection and subscribe to an endpoint of the client's GraphQL API. errChan is a channel on which are sent the errors of
graphql/client.go:51
↓ 3 callers
Method
___Type
(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type)
internal/integration/server/gqlgen_exec.go:5009
↓ 3 callers
Function
__marshalCovariantInterfaceImplementationRandomItemContentNextContent
(v *CovariantInterfaceImplementationRandomItemContentNextContent)
generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go:1129
↓ 3 callers
Function
__marshalCovariantInterfaceImplementationRandomItemContentRelatedContent
(v *CovariantInterfaceImplementationRandomItemContentRelatedContent)
generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go:1529
↓ 3 callers
Function
__marshalInnerQueryFragmentOtherLeafLeafContent
(v *InnerQueryFragmentOtherLeafLeafContent)
generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go:658
↓ 3 callers
Function
__marshalInnerQueryFragmentRandomItemContent
(v *InnerQueryFragmentRandomItemContent)
generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go:915
↓ 3 callers
Function
__marshalInnerQueryFragmentRandomLeafLeafContent
(v *InnerQueryFragmentRandomLeafLeafContent)
generate/testdata/snapshots/TestGenerate-ComplexNamedFragments.graphql-ComplexNamedFragments.graphql.go:1244
↓ 3 callers
Method
__premarshalJSON
()
generate/testdata/snapshots/TestGenerate-SimpleNamedFragment.graphql-SimpleNamedFragment.graphql.go:486
↓ 3 callers
Function
__unmarshalContentFieldsNextContent
(b []byte, v *ContentFieldsNextContent)
generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go:269
↓ 3 callers
Function
__unmarshalContentFieldsRelatedContent
(b []byte, v *ContentFieldsRelatedContent)
generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go:400
↓ 3 callers
Function
__unmarshalCovariantInterfaceImplementationRandomItemContentNextContent
(b []byte, v *CovariantInterfaceImplementationRandomItemContentNextContent)
generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go:1097
↓ 3 callers
Function
__unmarshalCovariantInterfaceImplementationRandomItemContentRelatedContent
(b []byte, v *CovariantInterfaceImplementationRandomItemContentRelatedContent)
generate/testdata/snapshots/TestGenerate-CovariantInterfaceImplementation.graphql-CovariantInterfaceImplementation.graphql.go:1497
↓ 3 callers
Method
convertType
convertType decides the Go type we will generate corresponding to a particular GraphQL type. In this context, "type" represents the type of a field,
generate/convert.go:221
↓ 3 callers
Function
expandFilenames
(globs []string)
generate/parse.go:89
↓ 3 callers
Function
fillDefaultString
(target *string, defaults ...string)
generate/genqlient_directive.go:397
↓ 3 callers
Function
findCfgInDir
(dir string)
generate/config.go:378
↓ 3 callers
Function
fragmentMatches
fragmentMatches returns true if the given fragment is "active" when applied to the given type. "Active" here means "the fragment's fields will be ret
generate/convert.go:709
↓ 3 callers
Function
getQueries
(basedir string, globs StringList)
generate/parse.go:115
↓ 3 callers
Function
joinPrefixList
(prefix *prefixList)
generate/names.go:125
next →
1–100 of 2,231, ranked by callers