Documentation
¶
Overview ¶
Package fieldgen adds additional fields to the graphql schema
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalField ¶
type AdditionalField struct {
// Name of the field to add
Name string
// Type of the field to add
Type string
// CustomType is an non-standard go type to use for the field, if set will override the Type field
// If the Scalar has already been defined manually, add it to Type instead, this will
// programmatically add the scalar to the schema
CustomType string
// NonNull indicates if the field is required
NonNull bool
// Description of the field
Description string
// AddToSchemaWithName is the name of the schema to add the field to, if empty will add to all schemas
// unless AddToSchemaWithExistingField is set
AddToSchemaWithNames []string
// AddToSchemaWithExistingField will add to any schema with the existing field, if empty will add to all schemas
// unless AddToSchemaWithName is set
AddToSchemaWithExistingField string
}
AdditionalField is a struct to with details about the additional field to add to the schema
type ExtraFields ¶
type ExtraFields struct {
// FieldDefs is a list of additional fields to add to the schema
FieldDefs []AdditionalField
}
ExtraFields is a struct to hold the additional fields to add to the schema
func NewExtraFieldsGen ¶
func NewExtraFieldsGen(fields []AdditionalField) *ExtraFields
NewExtraFieldsGen returns a new ExtraFields plugin
func (*ExtraFields) MutateConfig ¶
func (f *ExtraFields) MutateConfig(cfg *config.Config) error
MutateConfig satisfies the plugin interface
Click to show internal directories.
Click to hide internal directories.