A port of the parser from graphql-js into golang

Related tags

Utilities gqlparser
Overview

gqlparser CircleCI Go Report Card Coverage Status

This is a parser for graphql, written to mirror the graphql-js reference implementation as closely while remaining idiomatic and easy to use.

spec target: June 2018 (Schema definition language, block strings as descriptions, error paths & extension)

This parser is used by gqlgen, and it should be reasonablly stable.

Guiding principles:

  • maintainability: It should be easy to stay up to date with the spec
  • well tested: It shouldnt need a graphql server to validate itself. Changes to this repo should be self contained.
  • server agnostic: It should be usable by any of the graphql server implementations, and any graphql client tooling.
  • idiomatic & stable api: It should follow go best practices, especially around forwards compatibility.
  • fast: Where it doesnt impact on the above it should be fast. Avoid unnecessary allocs in hot paths.
  • close to reference: Where it doesnt impact on the above, it should stay close to the graphql/graphql-js reference implementation.
Comments
  • update Node.js harness

    update Node.js harness

    Rebased #178 after merging #169 as it adds to gqlparser support for e.g. interface Canine implements Mammal ... @Code-Hex @vvakame @wilhelmeek If you have ideas as to why the tests continue to fail, I would appreciate a fix.

    opened by StevenACoffman 12
  • What is __DirectiveResolver?

    What is __DirectiveResolver?

    Hello,

    Just by updating from v2.1.0 to v2.2.0 I noticed in my generated code I have now a new resolver:

    __DirectiveResolver

    I guess it's linked to: https://github.com/graphql/graphql-spec/pull/510

    I don't now if it's a bug, or if I have to implement something :)

    type ResolverRoot interface {
           // ...
    	__Directive() __DirectiveResolver
    }
    
    
    type __DirectiveResolver interface {
    	IsRepeatable(ctx context.Context, obj *introspection.Directive) (bool, error)
    }
    
    opened by tcastelly 8
  • Fix wrong validation on input field with default value

    Fix wrong validation on input field with default value

    Avoid must be defined error on an input field having a default value defined in the schema:

    type Query {
        structArg(i: InputType!): Boolean!
    }
    input InputType {
        name: String!
        defaultName: String! = "defaultFoo"
    }
    

    With variables:

    {
      "var": {
         "name": "foo"
      }
    }
    

    Before: Error received: input: variable.defaultName must be defined

    After: No more errors received, this is the expected behavior because a default value is defined in the schema.

    opened by vincenteasy 6
  • gqlparser accepts a schema with no query type and validates any query against it

    gqlparser accepts a schema with no query type and validates any query against it

    Consider the following schema:

    type T { f: String }
    

    Note the lack of a Query type (or a schema declaration pointing to an alternative entrypoint); you can't make any queries against it. However:

    1. gqlparser considers this schema valid; this is sort of debatable but the spec says "The query root operation type must be provided and must be an Object type." and here the query root operation type defaults to Query which is not a valid object type.
    2. Worse, gqlparser will validate any (otherwise syntactically correct) query against such a schema, e.g. the query { f { g } } will validate; this is clearly wrong. Indeed the same thing happens with an entirely empty schema.

    Here's a test case for your convenience (I just shoved it in a random file since I wasn't sure how the tests are organized):

    diff --git validator/imported/spec/schemas.yml validator/imported/spec/schemas.yml
    index e7db1f3..5eeafed 100644
    --- validator/imported/spec/schemas.yml
    +++ validator/imported/spec/schemas.yml
    @@ -487,3 +487,4 @@
       }
     
       scalar Any
    +- ""
    diff --git validator/spec/FragmentsOnCompositeTypes.spec.yml validator/spec/FragmentsOnCompositeTypes.spec.yml
    index ec8ad0b..012c154 100644
    --- validator/spec/FragmentsOnCompositeTypes.spec.yml
    +++ validator/spec/FragmentsOnCompositeTypes.spec.yml
    @@ -7,3 +7,10 @@
       errors:
         - message: Fragment "c" cannot condition on non composite type "Float".
         - message: Cannot spread fragment "c" within itself.
    +
    +- name: Empty schema
    +  schema: 20
    +  query: |
    +    { f { g } }
    +  errors:
    +    - message: Something should fail!
    
    help wanted 
    opened by benjaminjkraft 5
  • Fix arguments comparison logic for overlapping fields

    Fix arguments comparison logic for overlapping fields

    The current argument comparison seems different from graphql-js which is resulting in unexpected behavior like this. Instead of comparing all the arguments to each other, we just need to compare the corresponding ones (with the same argument.Name)

    opened by yar00001 5
  • Parser works but there are some syntax errors

    Parser works but there are some syntax errors

    Does the parser work as validator? In my case, parser works even if some syntax errors. I'm using Rego language, which use your parser. And having such case on the screen from Rego playground, where I use your parser give me OK, but actually it's wrong. The question is does you have a validate function separatly? Or don't have at all? Снимок экрана 2022-09-13 в 10 24 30 Снимок экрана 2022-09-13 в 10 29 15

    opened by olegroom 4
  • Memory leak at parser.parseField

    Memory leak at parser.parseField

    Hello! I have a memory issue while using gqlgen websocket transport. I measured memory using pprof and it seems there's a memory leak in gqlparser's code. Here's a dump https://gist.github.com/fletcherist/94f0bb3bc7b09ec5177fccd6cdf4d2d5

    Also attaching some screenshots which points to gqlparser

    Screenshot 2022-05-03 at 11 53 38 AM Screenshot 2022-05-03 at 11 53 15 AM help wanted 
    opened by fletcherist 4
  • Distribute prelude string over multiple lines

    Distribute prelude string over multiple lines

    Having one big long string literal in validator/prelude.go is a bit problematic. Foremostly it makes it hard to see what changes have been made in git history or blame. (I was trying to check if/when description: String field has been added to type __Schema.)

    Is there any reason not to have it extend over multiple lines? (String literals joined with the + operator are combined into one literal at compile time, I believe.)

    Perhaps even better would be to embed it (//go:embed), since go.mod is already at Go 1.16. (File embedding was added in 1.16.)

    opened by AndrewWPhillips 4
  • Fix for update by reference of default variable values

    Fix for update by reference of default variable values

    So Field "..." argument "..." of type "...!" is required but not provided. validation would always work, despite the order of the calls.

    Context of the issue

    # Note: there is default enum value in variables
    query SomeOperation ($locale: Locale! = DE) {
    	myAction(myEnum: $locale) {
    		id
    	}
    }
    
    query SomeOperation {
    	# Note: Not providing mandatory parameter: (myEnum: Locale!)
    	myAction {
    		id
    	}
    }
    
    • Before fix: Missing field not caught
    • After fix: Field "myAction" argument "myEnum" of type "Locale!" is required but not provided.

    Cause

    VariablesInAllowedPosition rule updates value.ExpectedType.NonNull = false, resulting in ProvidedRequiredArguments rule to have argDef.Type.NonNull changed on the next call.

    opened by aurelijusbanelis 4
  • make reproducable importer

    make reproducable importer

    current importer can't reproducable. We can't know what version of graphql-js does we use?.

    Current implementations use e6c36e0725ea0aabad1a19c68e54180fb7092e3a.

    latest commit of values_of_correct_type.go is Jul 19, 2018. https://github.com/vektah/gqlparser/commits/master/validator/rules/values_of_correct_type.go

    I picked up it from https://github.com/graphql/graphql-js/commits/master/src/validation/rules/ValuesOfCorrectType.js . e6c36e is made at Jul 18, 2018.


    So, I tried to update latest one. But I can't solve flowtype issue... 😿

    SyntaxError: .../gqlparser/validator/imported/graphql-js/src/error/GraphQLError.js: Identifier 'GraphQLError' has already been declared (86:16)
    
      84 | }
      85 |
    > 86 | export function GraphQLError( // eslint-disable-line no-redeclare
         |                 ^
      87 |   message: string,
      88 |   nodes?: $ReadOnlyArray<ASTNode> | ASTNode | void,
      89 |   source?: ?Source,
    

    https://github.com/vvakame/gqlparser/commits/improve-importer-r3 https://github.com/vvakame/gqlparser/commit/895df5cd7eaca64ea88786d9cb0eeadd46a26278

    Do you advanced to babel & flowtype ...?

    opened by vvakame 4
  • ast.Field#Definition is nil unexpectedly in Fragment walking

    ast.Field#Definition is nil unexpectedly in Fragment walking

    I'm trying to implement OverlappingFieldsCanBeMerged validator in here. but I got some issues.

    • I got ast.Field#Definition is nil in Fragment walking.
      • Fragment visitor fires before the walker sets the value of Definition 😿
    • I tried to implement observers.OnFragmentLeave, but walkSelection(parentDef *ast.Definition, it ast.Selection) and any other walker method using call by value.
      • golang's CodeReviewComments
      • I think we should use much more pointer!
        • I do not think that it is common to make call by value to represent non-nil
      • but maybe this is hard work... e.g...
        • type SelectionSet []Selectiontype SelectionSet []*Selection
        • func (Field) isSelection() {}func (*Field) isSelection() {}

    As a reasonable solution, I think that setting all the definitions before calling visitor. 🤔 However, I recommend using more pointers.

    opened by vvakame 4
  • proposal: Add benchmark

    proposal: Add benchmark

    Hello!

    I think the guiding principles of gqlparser is excellent. And part of them says the following.

    fast: Where it doesn't impact on the above it should be fast. Avoid unnecessary allocs in hot paths.
    

    In fact it is fast enough to run LoadQuery in 4661 ns/op.

    [email protected] gqlparser % go test -bench BenchmarkLoadQuery -benchmem
    goos: darwin
    goarch: arm64
    pkg: github.com/vektah/gqlparser/v2
    BenchmarkLoadQuery-8      251343              4661 ns/op            6073 B/op        141 allocs/op
    

    To keep and improve the performance, I propose to add benchmarks and reporting per Pull Request by Github Actions. I've made the draft and you can see in PR. https://github.com/vektah/gqlparser/pull/245

    opened by ryicoh 0
  • Add benchmarks and workflows using benchstat

    Add benchmarks and workflows using benchstat

    This is a draft of issue https://github.com/vektah/gqlparser/issues/246.

    PR includes:

    • Benchmarks of LoadSchema and LoadQuery in gqlparser_bench_test.go.
    • GHA workflow to report benchmark comparisons with master branch to PR

    The reporting is displayed like this. Screen Shot 2022-09-25 at 14 27 12

    https://github.com/ryicoh/gqlparser/pull/3#issuecomment-1257117351

    There are a lot of things to discuss.

    • Is benchmarking really necessary?
    • How about schemas and queries for benchmarks. Test data already exists here. validator/testdata
    • Use golang.org/x/perf/cmd/benchstat ?
    • Made PAT(Personal Access Token) for a reporting, but how do we manage the Secret? https://github.com/vektah/gqlparser/blob/4a7076be7757e8b4853c0f46c688b24d57e683b1/.github/workflows/pull-request.yml#L111
    opened by ryicoh 1
  • Invalid but legal cyclic dependency

    Invalid but legal cyclic dependency

    https://go.dev/play/p/OpXdRkWugrA

    In the example above I demonstrate a violation of the GraphQL spec:

    input T { self: T! }
    

    Cyclic dependency is illegal for input types.

    opened by romshark 0
  • Missing `Query` from the `query` field of `schema`

    Missing `Query` from the `query` field of `schema`

    FormatSchema method omits schema if schema.query is Query (code). I confirmed the same behavior in case of Mutation and Subscription. Why does it omits Query, Mutation or Subscription from schema? If the process to omit Query, Mutation and Subscription is not needed, I would like to create a PR and fix it.

    Thank you.

    package main
    
    import (
    	"bytes"
    	"fmt"
    
    	"github.com/vektah/gqlparser/v2"
    	"github.com/vektah/gqlparser/v2/ast"
    	"github.com/vektah/gqlparser/v2/formatter"
    )
    
    func main() {
    	strSchema := `
    	schema {
    		query: Query
    	}
    	type Query {
    		noop: Boolean!
    	}`
    
    	var buf1 bytes.Buffer
    	f := formatter.NewFormatter(&buf1, formatter.WithIndent("  "))
    	schema, _ := gqlparser.LoadSchema(&ast.Source{
    		Input: strSchema,
    	})
    	f.FormatSchema(schema)
    	fmt.Println("formatted schema1:\n", buf1.String())
    
    	strSchema = `
    	schema {
    		query: RenamedQuery
    	}
    	type RenamedQuery {
    		noop: Boolean!
    	}`
    
    	var buf2 bytes.Buffer
    	f = formatter.NewFormatter(&buf2, formatter.WithIndent("  "))
    	schema, _ = gqlparser.LoadSchema(&ast.Source{
    		Input: strSchema,
    	})
    	f.FormatSchema(schema)
    	fmt.Println("formatted schema2:\n", buf2.String())
    }
    
    $ go run main.go
    formatted schema1:
     type Query {
      noop: Boolean!
    }
    
    formatted schema2:
     schema {
      query: RenamedQuery
    }
    type RenamedQuery {
      noop: Boolean!
    }
    
    
    opened by kmtym1998 0
  • cannot use float64 as Int

    cannot use float64 as Int

    Hello!

    I have an input that contains a declared field called number, with an int value. sending a variable with the numerical value triggers the error trigger: validator.VariableValues gqlparser version: 2.4.1 Details:

    Error: 
    *github.com/vektah/gqlparser/v2/gqlerror.Error {err: error nil, Message: "cannot use float64 as Int", Path: github.com/vektah/gqlparser/v2/ast.Path len: 3, cap: 4, [*(*"github.com/vektah/gqlparser/v2/ast.PathElement")(0xc000204a40),*(*"github.com/vektah/gqlparser/v2/ast.PathElement")(0xc000204a50),*(*"github.com/vektah/gqlparser/v2/ast.PathElement")(0xc000204a60)], Locations: []github.com/vektah/gqlparser/v2/gqlerror.Location len: 0, cap: 0, nil, Extensions: map[string]interface {} nil, Rule: ""}
    
    github.com/vektah/gqlparser/v2/ast.Path len: 3, cap: 4, ["variable","vars","number"]
    

    gql:

    input insertData{
        name:String!
        data: data!
        lo:[String]!
        number:Int
    }
    input data{
        name: String
        value: String
    }
    type Query{
        readProviders(input: insertData):[Provider]
    }
    variable:
    {"vars":  { "name": "valor de name", "data": {},"lo":["cadena 1","cadena 2"], "number":10 }}
    Query:
    query($vars:insertData){
      readProvidersx(input:$vars) {
        _id
        name
        rif
        address
        phone1
        phone2
        email
        nameLegal
        companyClass
        withholdingAgent
      }
    }
    
    opened by pjmd89 1
Releases(v2.5.1)
  • v2.5.1(Sep 10, 2022)

    What's Changed

    • Fixes #231: Parsing a field type with a bang should not increase the … by @Aven30 in https://github.com/vektah/gqlparser/pull/236

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.5.0...v2.5.1

    Source code(tar.gz)
    Source code(zip)
  • v2.5.0(Aug 26, 2022)

    What's Changed

    • fix : returning error instead of *gqlError.Error by @schafle in https://github.com/vektah/gqlparser/pull/234

    New Contributors

    • @schafle made their first contribution in https://github.com/vektah/gqlparser/pull/234

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.4.8...v2.5.0

    Source code(tar.gz)
    Source code(zip)
  • v2.4.8(Aug 18, 2022)

    What's Changed

    • Add UnmarshalJSON implementations. by @philipaconrad in https://github.com/vektah/gqlparser/pull/232

    New Contributors

    • @philipaconrad made their first contribution in https://github.com/vektah/gqlparser/pull/232

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.4.7...v2.4.8

    Source code(tar.gz)
    Source code(zip)
  • v2.4.7(Jul 21, 2022)

    What's Changed

    • Fix #229 by @Aven30 in https://github.com/vektah/gqlparser/pull/230

    New Contributors

    • @Aven30 made their first contribution in https://github.com/vektah/gqlparser/pull/230

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.4.6...v2.4.7

    Source code(tar.gz)
    Source code(zip)
  • v2.4.6(Jul 3, 2022)

    What's Changed

    • Check for non-enum values on validation by @ameyarao98 in https://github.com/vektah/gqlparser/pull/227
    • Replace deprecated ioutil pkg with os & io by @abhinavnair in https://github.com/vektah/gqlparser/pull/228

    New Contributors

    • @ameyarao98 made their first contribution in https://github.com/vektah/gqlparser/pull/227
    • @abhinavnair made their first contribution in https://github.com/vektah/gqlparser/pull/228

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.4.5...v2.4.6

    Source code(tar.gz)
    Source code(zip)
  • v2.4.5(Jun 13, 2022)

    What's Changed

    • Allow doubly-defined builtin directives by @benjaminjkraft in https://github.com/vektah/gqlparser/pull/226
    • Validate that the operation's root type is valid by @benjaminjkraft in https://github.com/vektah/gqlparser/pull/225

    New Contributors

    • @benjaminjkraft made their first contribution in https://github.com/vektah/gqlparser/pull/226

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.4.4...v2.4.5

    Source code(tar.gz)
    Source code(zip)
  • v2.4.4(May 26, 2022)

    What's Changed

    • Report error about null value for any type that cannot be null, not for only built-in by @atzedus in https://github.com/vektah/gqlparser/pull/222

    New Contributors

    • @atzedus made their first contribution in https://github.com/vektah/gqlparser/pull/222

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.4.3...v2.4.4

    Source code(tar.gz)
    Source code(zip)
  • v2.4.3(May 23, 2022)

    What's Changed

    • formatter: skip printing insignificant commas in arguments definitions by @a8m in https://github.com/vektah/gqlparser/pull/220

    New Contributors

    • @a8m made their first contribution in https://github.com/vektah/gqlparser/pull/220

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.4.2...v2.4.3

    Source code(tar.gz)
    Source code(zip)
  • v2.4.2(Apr 20, 2022)

    What's Changed

    • Report definition name in validateDefinition errors by @sonatard in https://github.com/vektah/gqlparser/pull/206
    • Fix type documentation by @obukhov in https://github.com/vektah/gqlparser/pull/207
    • formatter: support setting space indent by @giautm in https://github.com/vektah/gqlparser/pull/208
    • fix: only write newline in the description if needs by @giautm in https://github.com/vektah/gqlparser/pull/209
    • Bump minimist from 1.2.5 to 1.2.6 in /validator/imported by @dependabot in https://github.com/vektah/gqlparser/pull/210
    • formatter fix: include argument directives by @jpleasu in https://github.com/vektah/gqlparser/pull/213
    • Embed prelude by @AndrewWPhillips in https://github.com/vektah/gqlparser/pull/214
    • feat: added AddTypes helper to ast.Schema by @giautm in https://github.com/vektah/gqlparser/pull/215
    • fix bug and delete String of Int and Float by @pjmd89 in https://github.com/vektah/gqlparser/pull/205
    • fix issue #160: validateVarType parsing numbers by @StevenACoffman in https://github.com/vektah/gqlparser/pull/216

    New Contributors

    • @sonatard made their first contribution in https://github.com/vektah/gqlparser/pull/206
    • @obukhov made their first contribution in https://github.com/vektah/gqlparser/pull/207
    • @giautm made their first contribution in https://github.com/vektah/gqlparser/pull/208
    • @jpleasu made their first contribution in https://github.com/vektah/gqlparser/pull/213
    • @AndrewWPhillips made their first contribution in https://github.com/vektah/gqlparser/pull/214
    • @pjmd89 made their first contribution in https://github.com/vektah/gqlparser/pull/205

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.4.1...v2.4.2

    Source code(tar.gz)
    Source code(zip)
  • v2.4.1(Mar 3, 2022)

    What's Changed

    • fixed issue for https://github.com/99designs/gqlgen/issues/2028 by @Code-Hex in https://github.com/vektah/gqlparser/pull/201
    • added validateTypeImplementsAncestors to validate implemented types by @Code-Hex in https://github.com/vektah/gqlparser/pull/202

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.4.0...v2.4.1

    Source code(tar.gz)
    Source code(zip)
  • v2.4.0(Feb 28, 2022)

    What's Changed

    • Support intermediate interfaces by @wilhelmeek in https://github.com/vektah/gqlparser/pull/169
    • fixed prelude.graphql to be correct in the latest spec by @Code-Hex in https://github.com/vektah/gqlparser/pull/182
    • supported schema description for introspection by @Code-Hex in https://github.com/vektah/gqlparser/pull/183
    • update Node.js harness by @vektah @Code-Hex @StevenACoffman in https://github.com/vektah/gqlparser/pull/181
    • updated prelude.graphql for the beta spec by @Code-Hex in https://github.com/vektah/gqlparser/pull/200
    • Bump gopkg.in/yaml.v2 from 2.2.4 to 2.2.8 by @dependabot in https://github.com/vektah/gqlparser/pull/199

    New Contributors

    • @dependabot made their first contribution in https://github.com/vektah/gqlparser/pull/199

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.3.1...v2.4.0

    Source code(tar.gz)
    Source code(zip)
  • v2.3.1(Jan 26, 2022)

    What's Changed

    • Revert "Add @specifiedBy directive declaration" by @StevenACoffman in https://github.com/vektah/gqlparser/pull/176

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.3.0...v2.3.1

    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Jan 26, 2022)

    What's Changed

    • make reproducable importer by @vvakame in https://github.com/vektah/gqlparser/pull/112
    • Update prelude to match graphql_spec for @deprecated directive by @danielnovograd in https://github.com/vektah/gqlparser/pull/155
    • Stop validator mutating the provided *Schema by @xzyfer in https://github.com/vektah/gqlparser/pull/158
    • docs: Fix a few typos in the README by @enisdenjo in https://github.com/vektah/gqlparser/pull/174
    • feat: do not mark __typename field as unknown in the schema validation by @damianopetrungaro in https://github.com/vektah/gqlparser/pull/172
    • Fix: argument comparison between two sets of args by @jufemaiz in https://github.com/vektah/gqlparser/pull/170
    • Add @specifiedBy directive declaration by @wilhelmeek in https://github.com/vektah/gqlparser/pull/168
    • Fix for update by reference of default variable values by @aurelijusbanelis in https://github.com/vektah/gqlparser/pull/161
    • Add release script by @StevenACoffman in https://github.com/vektah/gqlparser/pull/175

    New Contributors

    • @danielnovograd made their first contribution in https://github.com/vektah/gqlparser/pull/155
    • @xzyfer made their first contribution in https://github.com/vektah/gqlparser/pull/158
    • @enisdenjo made their first contribution in https://github.com/vektah/gqlparser/pull/174
    • @damianopetrungaro made their first contribution in https://github.com/vektah/gqlparser/pull/172
    • @jufemaiz made their first contribution in https://github.com/vektah/gqlparser/pull/170
    • @wilhelmeek made their first contribution in https://github.com/vektah/gqlparser/pull/168
    • @aurelijusbanelis made their first contribution in https://github.com/vektah/gqlparser/pull/161
    • @StevenACoffman made their first contribution in https://github.com/vektah/gqlparser/pull/175

    Full Changelog: https://github.com/vektah/gqlparser/compare/v2.2.0...v2.3.0

    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Apr 13, 2021)

    Added

    • Support for directives on variable definitions (#135)
    • Support for repeated directives, as per latest GraphQL spec (#148)
    • gqlerror.List now meets the go 1.13 error interfaces for Is and As (#147)
    • Support for coercing single value list inputs to lists of one element (#138)
    • Support for VARIABLE_DEFINITION executable directive (#151)

    Updated

    • Improved formatting of block comments on args (#124)
    • Aligned root type inference more closely to the spec (#144)

    Fixed

    • Ensure directives are only used in accordance with their definitions (#132) (#150)
    • Fixed issue where default values were not considered when validating fields (#122)

    Thanks to everyone who contributed to this release!

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Sep 21, 2020)

    Updated

    • GraphQL errors now satisfy the go 1.13 error unwrapping interface.
      • This allows gqlgen to wrap all user errors at the point they returned to the runtime, allowing accurate GraphQL path information to be attached to the error.
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Feb 16, 2020)

  • v2.0.0(Feb 16, 2020)

    Changed

    • Paths now have an interface over them to let the caller know what values are possible https://github.com/vektah/gqlparser/pull/117
    • Swap some NotNulls in the introspection types - https://github.com/vektah/gqlparser/pull/120/files
    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(Feb 8, 2020)

  • v1.3.0(Feb 8, 2020)

    Added

    • non existing types can be extended now - https://github.com/vektah/gqlparser/pull/116

    Fixed

    • generated syntax when using multiple interfaces is now valid - https://github.com/vektah/gqlparser/pull/115
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Jan 7, 2020)

  • v1.2.0(Nov 7, 2019)

    Added

    • Can now turn ast back into schema - https://github.com/vektah/gqlparser/pull/103
    • Can now fetch repeated directives - https://github.com/vektah/gqlparser/pull/106
    • Validate invalid enums in variables - https://github.com/vektah/gqlparser/pull/109

    Fixed

    • Allow scalars to be nil - https://github.com/vektah/gqlparser/pull/104
    Source code(tar.gz)
    Source code(zip)
  • v1.1.2(Mar 11, 2019)

  • v1.1.1(Feb 18, 2019)

  • v1.1.0(Jan 26, 2019)

  • v1.0.0(Nov 28, 2018)

Owner
Adam Scarr
Adam Scarr
Split multiple Kubernetes files into smaller files with ease. Split multi-YAML files into individual files.

Split multiple Kubernetes files into smaller files with ease. Split multi-YAML files into individual files.

Patrick D'appollonio 196 Nov 10, 2022
Split multiple Kubernetes files into smaller files with ease. Split multi-YAML files into individual files.

kubectl-slice: split Kubernetes YAMLs into files kubectl-slice is a neat tool that allows you to split a single multi-YAML Kubernetes manifest into mu

Patrick D'appollonio 197 Nov 22, 2022
go generate based graphql server library

gqlgen What is gqlgen? gqlgen is a Go library for building GraphQL servers without any fuss. gqlgen is based on a Schema first approach — You get to D

99designs 8.3k Nov 28, 2022
This is Go library for building GraphQL client with gqlgen

gqlgenc What is gqlgenc ? This is Go library for building GraphQL client with gqlgen Motivation Now, if you build GraphQL api client for Go, have choi

Yamashou 280 Nov 22, 2022
The easiest way to make API documents for GraphQL

Document Generator for GraphQL gqldoc is now alpha gqldoc is command line tool to generate documents from GraphQL schema or your GraphQL endpoint. the

Kei Kamikawa 161 Nov 17, 2022
gqlanalysis makes easy to develop static analysis tools for GraphQL in Go.

gqlanalysis gqlanalysis defines the interface between a modular static analysis for GraphQL in Go. gqlanalysis is inspired by go/analysis. gqlanalysis

null 36 Nov 1, 2022
GoLang port of Google's libphonenumber library

phonenumbers golang port of Google's libphonenumber, forked from libphonenumber from ttacon which in turn is a port of the original Java library. You

null 792 Nov 23, 2022
Serial-locate - A simple tool for searching the COM port

serial-locate A simple tool for searching the COM port Usage Direct query serial

Dirk Arnez 0 Jan 18, 2022
Golang flags parser with zero dependency

flags Golang flags parser with zero dependency. Usage See simple.go for basic usage. Concept flags gives a simple way to get flag's value from argumen

Vincent Boutour 0 Jan 16, 2022
bebop is a bebop parser written in Go, for generating Go code.

bebop is a bebop parser written in Go, for generating Go code. bebop can read .bop files and output .go files representing them: package main i

Patrick Stephen 47 Nov 6, 2022
A parser for Ontario's baby name data

obnp What? A parser for Ontario's baby name data Why? I wanted to see if a specific name existed in both the male and female datasets. This tool is mo

liv 1 Mar 15, 2022
A data parser lib for Go with pythonic grammar sugar and as concern as possible for high performance

mapinterface - A data parser lib for Go with pythonic grammar sugar and as concern as possible for high performance mapinterface 旨在消灭对map/list解析而产生的层层

Knownothing 1 Nov 10, 2021
Getting into Golang 1.18

Go 1.18 New features of Golang 1.18 with tutorial and examples. In this repository I introduce new features of Golang version 1.18 with their examples

AmirH.Najafizadeh 13 Aug 28, 2022
libraries for various programming languages that make it easy to generate per-process trace files that can be loaded into chrome://tracing

chrometracing: chrome://tracing trace_event files The chrometracing directory contains libraries for various programming languages that make it easy t

Google 23 Oct 6, 2022
Go library for decoding generic map values into native Go structures and vice versa.

mapstructure mapstructure is a Go library for decoding generic map values to structures and vice versa, while providing helpful error handling. This l

Mitchell Hashimoto 6.3k Nov 22, 2022
go-i18n is a Go package and a command that helps you translate Go programs into multiple languages.

go-i18n is a Go package and a command that helps you translate Go programs into multiple languages.

Nick Snyder 2.2k Nov 19, 2022
simple GitHub action to parse Markdown Links into a .yaml file for Hugo

Obsidian Link Scrapper Used by Quartz This repository comes to you in two parts. GitHub Action (scrapes links into a .yml file) Hugo Partial (turns .y

Jacky Zhao 80 Nov 17, 2022
Chaos Engineering tool for introducing failure into syscalls

Syscall monkey Chaos Engineering tool for tampering with syscalls.

null 7 Jun 11, 2022
A Go utility to convert Go example tests into jupyter notebooks.

go2colab Scientists (my main project's users) love jupyter notebook tutorials pkg.dev.go's runnable playground doesn't support file IO but I love exam

Tim 1 Jul 10, 2022