Releases: wundergraph/graphql-go-tools
v1.8.1
With this release proxy tests are now structured in a way to enable easy extensibility of the proxy.
Changelog
34a9a7b Merge pull request #83 from jensneuse/feature/simplify-proxy-tests
ee93d93 add comments to RequestConfig and RequestConfigProvider to make them easier to understand
072951f delete replaced test
70b268a refactor all proxy tests into a structured scheme with better reusability
7af2ce7 refactor existing proxy tests to use a structured testing format
v1.8.0
This release adds the capability to lex and parse the "extend" keyword.
A future release will add the ability to merge graphql doc extensions. (see #82 )
Changelog
83f79f1 Merge branch 'master' into feature/66-implement-extends-keyword
e5add5f Merge branch 'master' into feature/66-implement-extends-keyword
b2fdd9d Merge branch 'master' into feature/66-implement-extends-keyword
6f181ad Merge pull request #81 from jensneuse/feature/66-implement-extends-keyword
26f0e8f add EXTENDS keyword and update stringer
648ae84 add EXTENDS test for peek and read
eecc8bb add IsExted to object type definition
d41f696 add IsExtend to DirectiveDefinition
e66c24a add IsExtend to EnumTypeDefinition
8cac6e8 add IsExtend to InputObjectTypeDefinition
423f2e0 add IsExtend to UnionTypeDefinition
2651a9d add IsExtend to scalar type definition
d529f41 add IsExtend to schema definition doctype
c5c8ebc add SchemaDefinitions to parser.ParsedDefinitions
5cd7c26 add extend directive test
11a7ff8 add extend parsing test
ba6808b add extend test for enum
e5be2f0 add extend test for input
b8e3e4d add extend test for interface type
d10bebc add extend union test
84ec1f0 add isExtend testing func to parser testhelper
876e3f4 add isExtend to interface doc type
99ea537 add test helper func for extend directive
5243f7b add test helper impl for extend enum
76fe42f add testhelper func for extend union
b8803b4 comment out incomplete introspection implementation based on deprecated apis
67946cc delete type system definition doc type as schemadefinitions are now standalone
d6e63d6 fix typo: extends -> extend
4ec274b implement extend directive parser
2d74d14 implement extend enum parser
e82d7e1 implement extend for object type definition
3046647 implement extend input
6460dfe implement extend interface parsing
4ffbd59 implement extend parsing for scalar type definition
03db964 implement extend parsing for type system definitions
a0a95f7 implement extend union parser, add description parsing to union parser (bugfix)
5c8f752 implement interface for isExtend test
ad3cde5 implement keywordFromIdent for extends
ce184a5 implement testhelper for extend input
9f0af6e remove unused code
a400056 update diffview dependency
3b0d9f3 update fixtures to reflect recent changes
72c1199 update golden fixture
c3658a0 update lookup methods to deal with the new ast structure of schema definitions
9583ad9 update parseSchemaDefinition to be able to parse multiple schema definitions in one document
24a5ff6 update parser test to jsonify the complete parsed definitions
1df8de7 update parser testhelper to support new schema definition doctype structure
d01964a update printer to be able to print multiple schema definitions in one document
e8f9230 update type system definition tests to be able to test for multiple schema definitions in one document
817bbb3 update type system defninition parser to allow parsing multiple schema definitions in one document
7a821c4 update walker to walk the new schema definition ast structure
v1.7.1
This minor release fixes a bug that led to a crash when a user supplied an empty list (array) as argument.
Changelog
f0e4400 Merge pull request #80 from jensneuse/bug/empty-list
cdd0e4d apply gofmt
7214f0c failing empty list bug
e950b12 fix but that led to deleting empty list values
6bbbbc4 make parsePeekedListValue return the reference instead of using a ref pointer
795d9e4 update test to reflect recent changes
4455d91 update test to reflect recent changes
Add variables to the proxy
This PR adds the capability of handling variables to the proxy.
Variable definitions will get parsed and printed as well as proxied to the backend.
Variables defined in the request JSON will be proxied to the backend too.
Thanks to @mvid for contributing this feature!
Changelog
9a842a5 Merge branch 'master' into bug/73-query-variables
ed0d3c6 Merge pull request #72 from jensneuse/bug/66-swallowed-err
5c6d04a Merge pull request #74 from jensneuse/bug/73-query-variables
354708c Merge pull request #76 from jensneuse/bug/75-dropping-signature
97912a6 another test
bdcbf51 apply formatting and delete unnecessary duplicates
7dd1352 apply gofmt
8c03ca1 apply slight structural change to test
25ec954 fix test description vom plural to singular
607e599 handle DispatchRequest error in a non-silent way
476e61e linting
79bff9b make iterator signature match the other implementations
e19b916 missing fixtures added
b7e607f pass variables along with outgoing request to backend graphql server
d9b9be3 proxy failure regression test
37d16db test for variable proxy
1b2a6be use existing type printing function
7da12db variable definitions in printer
v1.6.2
Changelog
9a842a5 Merge branch 'master' into bug/73-query-variables
ed0d3c6 Merge pull request #72 from jensneuse/bug/66-swallowed-err
5c6d04a Merge pull request #74 from jensneuse/bug/73-query-variables
354708c Merge pull request #76 from jensneuse/bug/75-dropping-signature
97912a6 another test
bdcbf51 apply formatting and delete unnecessary duplicates
7dd1352 apply gofmt
8c03ca1 apply slight structural change to test
25ec954 fix test description vom plural to singular
607e599 handle DispatchRequest error in a non-silent way
476e61e linting
79bff9b make iterator signature match the other implementations
e19b916 missing fixtures added
b7e607f pass variables along with outgoing request to backend graphql server
d9b9be3 proxy failure regression test
37d16db test for variable proxy
1b2a6be use existing type printing function
7da12db variable definitions in printer
v1.6.1
Changelog
c18ac36 Merge pull request #61 from jensneuse/cleanup
b12e8b8 Merge pull request #62 from jensneuse/add-byteslices-single-linked-list
05a71b0 add bootstrap to 'make ci'
58e7088 add formatting
57150e8 cleanup go mod
54e84c5 fix order in tests
6b44f61 make parser implement ByteSliceReferenceGetter
7ac172b refactor parseImplementsInterfaces to use ByteSliceReferences
d412422 replace []int with ByteSliceReferences for NodeImplementsInterfaces
c75d273 simplify circle ci config
b67b417 update fixtures
1c5258a update lookups for ByteSliceReferences
af9079c update parser testhelper to use ByteSliceReferences
v1.6.0
Changelog
b5158bc Merge pull request #54 from jensneuse/proxy-backend-headers
ec82450 Merge pull request #55 from jensneuse/optional-operation-name
99d4d14 Merge pull request #59 from jensneuse/10-undefined-types-in-middlewares
41284b8 Merge pull request #60 from jensneuse/migrate-to-go-mod
87f569f add ExtendTypeSystemDefinition to parser
2dd150d add ExtendTypeSystemInput to the lexer so that modifications after the initial parsing are possible
a6b26f6 add PrepareSchema func to GraphqlMiddleware interface which enables a middleware to modify the schema before execution
2f7e2a1 add calling PrepareSchema on all middlewares to the invoker before executing OnRequest
ef672da add formatting
c2a7cdd add formatting
43ad297 add go.mod and go.sum
523399f add golangci-lint @v1.16.0 dependency
b318280 add golangci-lint to circle ci config
998e9b1 add headers to request config, for application on requests to the backend servers
004c9ab add seperate test data for testing the validation middleware
de5a2d3 add tests for extending the type system definition
c402039 add tests for type system definition extension
d798762 add tests to the lexer for ExtendTypeSystemInput
5045f99 cleanup Makefile and invoke ci testing via makefile
09cb625 drop gometalinter from ci
839682a fix circle ci yaml
376a170 fix linting errors
6880877 fix typo
0fbba3f implement PrepareSchema for context middleware
05bff2a implement PrepareSchema for the asset middleware
3fef22b implement PrepareSchema for validation middleware
09fc03e remove blank operation name from tests
b19f5cc remove gometalinter config
fe92a3e remove now unnecessary declaration of the context middleware directive directly in the schema
9a9b08d remove vendor
c6c8ce0 remove yoda conditions from test code
73fc869 simplify parsing type system definition / executable definition
6fae05e simplify the helper method InvokeMiddleware by using the invoker
e204944 this commit fixes a potential included empty operation name, which can cause problems with older graphql implementations
52803a2 update README adding paragraph on go version and go modules
aea058e update circle ci config to use golang 1.12 and drop working directory
98a080b update lexer mock after adding ExtendTypeSystemInput
v1.5.0
Changelog
11c7746 Merge branch 'master' into cleanup
f1fbba7 Merge branch 'proxy-update' of https://github.com/mvid/graphql-go-tools into mvid-proxy-update
8614eaa Merge pull request #43 from jensneuse/mvid-proxy-update
2ffd759 Merge pull request #45 from jensneuse/cleanup
3ba40ab Merge pull request #46 from jensneuse/parser-accept-comments
b8774f0 Merge pull request #47 from jensneuse/44-scaling-ParseTypeSystemDefinition
f8fc21e Merge pull request #50 from jensneuse/mvid-proxy-update
8b22931 Merge pull request #52 from jensneuse/55-context-middleware-quote-input
d58a6b1 Proxy Update: Contexts
eb214ca add InputValueDefinitions (single linked list iter) struct to document package
0666a77 add SetContextValues to http proxy so that the context middleware works in e2e tests
abf57b9 add big schema benchmark
f46e273 add big schema test data
c5f1d03 add formatting
e1f04a4 add formatting
10a71d4 add formatting
4164c52 add lexer test for comments with hashtag
d5616ef add meaningful error message in case a context value is missing
89fb8b3 add more tests including escaped quotes inside the string
ac62361 add test to parser for comment parsing
01dd657 add tests to ensure string quoting
59cbfa3 change signature for NodeFieldsDefinition from []int to FieldDefinitions iterator
cec16da change signature of EnumValueDefinitions from []int to single linked list iterator
153835b change signature of InputValueDefinitions from []int to InputValueDefinitions struct
c959beb delete deprecated code
733ad03 fix lookup test
c5a2980 fix lookup test
4e8f4f9 fix printer test to correctly report errors
2b86468 fix test to reflect new structure
027d9a5 fix testhelper
f3b29a2 fix tests to reflect structural changes
b2e7ec6 implement EnumValueDefinitions iterator
c511271 implement FieldDefinitions iterator
7a7b078 implement comment with hashtag lexing
88e7c6e make context middleware accept strings or a byte slice as argument value
a25d939 make parser accept comments
3fff84c make parser accepts comments
1587d35 make the quoting aware of having pre or suffixed quotes
fd23772 make walker use ParsedDefinition instead of references on the TypeSystemDefinition which got removed
9c4b7d7 make walker use the new FieldDefinition iterator
2846ebe merge master
546ec4b out comment debug info
7a521d9 proxy updates
2931ee9 refactor arguments definition parsing to use InputValuesDefinitions struct
0a12d0d refactor context middleware to quote string/slice inputs if they weren't already quoted
11457b2 refactor input fields definition parsing
7880b21 refactor input value definitions parsing to return InputValueDefinitions struct
816e26f refactor lookup to implement EnumValueDefinitionGetter
20fbd50 refactor lookup to use InputValueDefinitions
a74cc7f refactor lookup to use the FieldDefinitions iterator
012983c refactor parseFieldDefinitions to return FieldDefinitions instead of []int
d3cdfc7 refactor parseInterfaceTypeDefinition to use FieldDefinitions
2b5f3cd refactor parseObjectTypeDefinition to use FieldDefinitions
b4f88a0 refactor parser to use EnumValueDefinitions iterator
64c18f2 refactor printer to use EnumValueDefinitions iterator
a12e30f refactor printer to use FieldsDefinition iterator
75823b3 refactor readComment: remove the need to peek makes it faster
78058a4 refactor type switching
6dd0fd3 refactor validation to use InputValueDefinitions
482641b refactor walker to use InputValueDefinitions
bcebd0f removal of duploate test
d077686 remove TypeSystemDefinition from Node interface
ffc7c2a remove deprecated code on initTypeSystemDefinition
3f341a6 remove newline at err end
8791038 remove printMemUsage from test
59051fd remove unused code
3ccfe1e rename NewStaticSchemaProvider to NewStaticRequestConfigProvider
84d3cb0 replace []int with FieldDefinitions in InterfaceTypeDefinition
28c0ec5 replace buffered reader with io.copy
f197e82 replace fasthttp proxy in staticProxy cmd with http proxy
e1fe3bf simplify configuration of staticproxy
18d4050 simplify fast static proxy configuration
ebd3c47 simplify type system definition parsing as indexes on typeSystemDefinition struct got removed
32ed4ac update fast static proxy tests
4bc9792 update fixtures to reflect removed code changes
783b19b update parser object cache structure to use EnumValueDefinitions Iterator
686ff3e update parser to use the new structure and implement FieldDefinitionGetter
c287bb8 update printer to use InputValueDefinitions
ca0b71d update staticProxy cmd to reflect changes to the proxy config structure
627e311 update structure of ParsedDefinitions, remove argumentsDefinition/inputFieldsDefinition initializer
eaff368 update tests
67b797c update tests and fixtures
ef3fba7 update tests and fixtures because the field order changed
ac88959 update validation to use the FieldDefinition iterator
v1.4.0
This release adds the "staticProxy" cmd.
Static proxy is a ready to use configurable proxy.
The proxy (currently) works with a single backend.
In the current version it comes with 2 features:
- Validation (validates queries against a schema)
- Context Middleware (rewrite query Arguments based on request headers)
The lexer now supports an input up to 1.000.000 Byte. (Could be configured to more, would increase memory usage).
I've removed a few bottlenecks so that the proxy is able to parse 500kb schema's on a modern CPU in < 10ms. Small schemas (<50kb) can be parsed in <1ms. Query parsing and validation is usually <1ms.
This makes the library/proxy a good fit if the schema is not known ahead of time. So it's definitely possible to fetch the schema at request time, parse it and then proceed with the request.
v1.3.0
This version adds initial support to build a graphql proxy. To illustrate possible use cases a context based middleware was added. It's intended to rewrite graphql queries based on the request context in combination with schema annotations via directives.