Skip to content

Commit

Permalink
Expose query.Parse at the top level (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinwyszynski authored Jan 4, 2024
1 parent 1e322b6 commit 4e3e7b3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions parse_query.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package graphql

import (
"github.com/graph-gophers/graphql-go/ast"
"github.com/graph-gophers/graphql-go/errors"
"github.com/graph-gophers/graphql-go/internal/query"
)

// ParseQuery parses a GraphQL query string and returns the AST root node and
// any errors. It only serves to expose the internal query.Parse function.
func ParseQuery(queryString string) (*ast.ExecutableDefinition, *errors.QueryError) {
return query.Parse(queryString)
}

0 comments on commit 4e3e7b3

Please sign in to comment.