graphutil

package
v0.0.0-...-599a714 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package graphutil provides helpers for working with GraphQL/gqlgen. This is heavily inspired by https://gqlgen.com/reference/field-collection/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsAnyOf

func ContainsAnyOf(ctx context.Context, targets ...string) bool

func GetPreloadString

func GetPreloadString(prefix, name string) string

func StringToPtr

func StringToPtr[S ~string](s S) *string

func TimeToPtr

func TimeToPtr(t time.Time) *time.Time

Types

type Fields

type Fields struct {
	// contains filtered or unexported fields
}

func GetNestedPreloads

func GetNestedPreloads(ctx *graphql.OperationContext, fields []graphql.CollectedField, prefix string) *Fields

func GetPreloads

func GetPreloads(ctx context.Context) *Fields

func (*Fields) ContainsAnyOf

func (f *Fields) ContainsAnyOf(targets ...string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL