Documentation ¶
Index ¶
- Constants
- type Args
- type Logger
- type Plugin
- type Schema
- func (schema *Schema) Comment(s string)
- func (schema *Schema) FileName(filename *string)
- func (schema *Schema) Mutations()
- func (schema *Schema) NewLine(length ...int)
- func (schema *Schema) Print(msg ...string)
- func (schema *Schema) Queries()
- func (schema *Schema) Space(length ...int)
- func (schema *Schema) Write(s string)
- func (schema *Schema) WriteHeader()
- func (schema *Schema) WriteTypeName(name *string)
Constants ¶
View Source
const ( NAME = "protoc-gen-graphql" VERSION = "v0.1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct { // Sets the code gen target Target string // If true, keep the casing for type fields. Else fields will be converted to camel case KeepCase bool // If true, keeps the prefix in type names KeepPrefix bool // If true, combines the output file to one single file CombineOutput bool // Sets custom output file names OutputFileNames []string // Wether to suffix or prefix input names. Suffixing the word 'Input' is the default behavior InputNaming string // What to prefix or suffix with the input type names. // Word 'Input' is default for suffix and letter 'I' is default for prefix Affix string // If true, generate schema against all the files explicitly listed in the command line // and everything they import. Default to false All bool }
type Plugin ¶
type Plugin struct { Request *pluginpb.CodeGeneratorRequest Response *pluginpb.CodeGeneratorResponse // contains filtered or unexported fields }
func (*Plugin) SetSupportOptionalField ¶
func (plugin *Plugin) SetSupportOptionalField()
Sets the support optional field option
type Schema ¶
func CreateSchema ¶
func CreateSchema(protoFile *descriptorpb.FileDescriptorProto) *Schema
Creates new Schema
func (*Schema) Mutations ¶
func (schema *Schema) Mutations()
Constructs mutations from service methods and fills the schema.mutations
func (*Schema) Queries ¶
func (schema *Schema) Queries()
Constructs the Object types from message types and fills the schema.objectTypes
func (*Schema) WriteTypeName ¶
Writes the type's name
Click to show internal directories.
Click to hide internal directories.