operationname

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: MIT Imports: 2 Imported by: 0

README

operationname

pkg.go.dev

operationname print operation name in your GraphQL query files.

# Query
query GetUser {
   user {
       name
   } 
}

mutation UpdateUser($name: String!) {
    updateUser(name: $name) {
        id
        name
    }
}

Usage

$ go install github.com/gqlgo/operationname/cmd/operationname@latest

The operationname command has two flags, schema and query which will be parsed and analyzed by operationname's Analyzer.

$ operationname -schema="server/graphql/schema/**/*.graphql" -query="client/**/*.graphql"
GetUser
UpdateUser

The default value of schema is "schema/*/**.graphql" and query is query/*/**.graphql.

schema flag accepts URL for a endpoint of GraphQL server. operationname will get schemas by an introspection query via the endpoint.

$ operationname -schema="https://example.com" -query="client/**/*.graphql"

Author

Appify Technologies, Inc.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyzer

func Analyzer() *gqlanalysis.Analyzer

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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