Documentation
¶
Index ¶
- func EmitFileCompletion(w io.Writer, ts schema.TypeSystem, c *config) error
- func EmitFileHeader(w io.Writer, pkg, tsPkg string, c *config)
- func EmitList(t *schema.TypeList, w io.Writer, c *config)
- func EmitMap(t *schema.TypeMap, w io.Writer, c *config)
- func EmitScalar(t schema.Type, w io.Writer, c *config)
- func EmitStruct(t *schema.TypeStruct, w io.Writer, c *config)
- func EmitUnion(t *schema.TypeUnion, w io.Writer, c *config)
- func Generate(pth string, pkg string, ts schema.TypeSystem, tsPkgName, tsPkgPath string) error
- func GetPreExistingMethods(dst string) map[string]struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmitFileCompletion ¶
func EmitFileCompletion(w io.Writer, ts schema.TypeSystem, c *config) error
EmitFileCompletion templates deferred definitions run at `init()` time.
func EmitFileHeader ¶
EmitFileHeader templates the start of the schema.go generated content.
func EmitScalar ¶
EmitScalar defines a scalar type for custom scalars in the type system.
func EmitStruct ¶
func EmitStruct(t *schema.TypeStruct, w io.Writer, c *config)
EmitStruct generates the definition of a struct type.
func Generate ¶
Generate creates `schema.go` at `pth` (with go package `pkg`) that represents a graphql schema of the `ts` schema. The generated code will expect the schema also has been turned into a golang schema using the go-ipld-prime code generation, and that the generated golang schema can be referenced as `tsPkgName` at `tsPkgPath`.
func GetPreExistingMethods ¶
GetPreExistingMethods returns a list of non-schema-generated symbols in a destination go package
Types ¶
This section is empty.