Skip to content

v1.9.1: sync with tyk master (#240)

Compare
Choose a tag to compare
@jensneuse jensneuse released this 02 Feb 13:27
· 1634 commits to master since this release
92fdd8e
* Add datasource hooks (#67)

* add hooks for graphql datasource

* add graphql hooks to the contract

* add hooks for http json data source

* add hook test for http json

* fix tests

* fix extracting variables with multiple queries on contract (#71)

* implement root field depths (TT-204) (#72)

* provide per root field complexity

* change internal complexity return values

* wip: per field complexity

* implement per root field complexity

* fix linter errors

* change namings according some PR remarks

* Fix/tt 571 update field depth calculation (#73)

* rename operation_complexity.FieldComplexityResult to RootFieldStats
fix depth calculation for the root fields

* remove unnecessary allocations

* reset counters after living root field (#75)

* Feat/add introspectionhelper to graphql (#74)

* add node modules to gitignore

* add IsIntrospectionQuery to graphql.Request

* add IntrospectionResponse to graphql.Schema

* add detecting introspection query without name

* add more safe conditions

Co-authored-by: Sergey Petrunin <sergey@tyk.io>

* fix detecting introspection (#76)

add data root field to introspection response

* add helper introspection as an execution result (#77)

* implement missing subscription and websocket protocol parts (TT-904) (#78)

* send complete on unsubscribe

* update tests and function returns

* add ability to execute non-subscription query

* add test for server returning error on invalid queries

* add buffer pool

* expose some websocket functionality

* fix potential issues with websocket handler

* go fmt & imports

* fix build

* fix websocket client
cleanup websocket client test

* add tests for operation selection

* fix operation name selection

* add error cases

* add compatibility for go 1.12

* use WithContext correct

* refactor OperationNameExists function

* iterate root nodes instead of operation definition as it could lead to bugs

* select number of operations in document from rootnodes

* update deps

* introduce EngineV2Configuration

* introduce EngineResultWriter

* implement engine execution with first test

* refactor tests

* port all v1 tests to v2

* add benchmark for v2

* use context.Background instead of nil

* fix typo

* change writer to flush writer

* introduce engine executor abstraction for subscriptions

* add function to get operation type from graphql request

* improve errors in graphql package

* fix typo

* revert typo

* rearrange handler test

* implement websockets for engine v2

* fix small issues

* fix broken test

* add hooks implementation for v2 (#85)

* remove comments

* implement hook context with path (#87)

* implement hook context with path

* fix matching issue

Co-authored-by: Patric Vormstein <pvormstein@googlemail.com>

* Feat/implement header injection (#88)

* implement resolving header from request

* implement header injection

* fix subscription initialization

* fix planning for nested datasources

* add test for current implementation

* add function to check for blocked and allowed fields

* add missing type in enum

* rename test lists correctly

Co-authored-by: Patric Vormstein <pvormstein@googlemail.com>
Co-authored-by: Sergey Petrunin <spetrunin@users.noreply.github.com>
Co-authored-by: Sergey Petrunin <sergey@tyk.io>