Documentation
¶
Overview ¶
package graphutils provides utility functions for working with graph requests
Index ¶
- func CheckForRequestedField(ctx context.Context, fieldName string) bool
- func GetInputFieldVariableName(ctx context.Context) string
- func GetMapInputVariableByName(ctx context.Context, fieldName string) *map[string]any
- func GetPreloads(ctx context.Context, maxPageLimit *int) []string
- func GetStringInputVariableByName(ctx context.Context, fieldName string) *string
- func SetFirstLastDefaults(first, last, maxPageSize *int) (*int, *int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForRequestedField ¶
CheckForRequestedField checks if the requested field is in the list of fields from the request
func GetInputFieldVariableName ¶
GetInputFieldVariableName returns the input field variable name from the graphql request this is used to skip the input field when processing file uploads for bulk create mutations
func GetMapInputVariableByName ¶
GetMapInputVariableByName returns the input variable by name for map variables (e.g. input)
func GetPreloads ¶
GetPreloads returns the preloads for the current graphql operation
func GetStringInputVariableByName ¶
GetStringInputVariableByName returns the input variable by name for string variables (e.g. id)
func SetFirstLastDefaults ¶
SetFirstLastDefaults sets the first and last values to the default limit if they are greater than the default limit if both are nil, return the default limit
Types ¶
This section is empty.