Skip to content

Commit

Permalink
Ariadne GraphQL Proxy 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalp committed Mar 26, 2024
1 parent 8f258b5 commit 93688f2
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 3 deletions.
4 changes: 1 addition & 3 deletions website/blog/2024-03-18-ariadne-0-23.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,4 @@ Ariadne 0.23 includes an extra validation step that raises a dedicated error whe
- Added `execute_get_queries` setting to the `GraphQL` apps that controls execution of the GraphQL "query" operations made with GET requests. Defaults to `False`.
- Added support for the Apollo Federation versions up to 2.6.
- Fixed deprecation warnings in Apollo Tracing extension.
- Added a check to prevent `subscription` operation execution when a query is made with POST request.


- Added a check to prevent `subscription` operation execution when a query is made with POST request.
58 changes: 58 additions & 0 deletions website/blog/2024-03-26-ariadne-graphql-proxy-0-3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: Ariadne GraphQL Proxy 0.3
---

Ariadne GraphQL Proxy 0.3 is now available.

This release implements new features we found necessary for our use cases and fixes the issues we've found in testing.

<!--truncate-->

## Cache serializers

Cache backends now support serializer customization for better control on how data is dehydrated and re-hydrated for selected cache store.


## Fixed schema proxy error when variable in operation was not in `variables`

GraphQL supports optional variables. Those are variables which can be either `null` or are omitted from `variables`.

Previously, Ariadne GraphQL Proxy would crash with `KeyError` if optional variable was omitted from `variables`. This was fixed in 0.3 release.


## Fixed `union` fields support

Ariadne GraphQL Proxy would attempt to retrieve a list of fields for `union` type, crashing with a `KeyError`.

In 0.3 release GraphQL Proxy is aware of `union` types and implements a dedicated query splitting logic for fields returning them.


## Custom headers

Custom headers configuration was improved for both `ProxyResolver` and `ProxySchema`.

It is now possible to set default headers that should be included in requests made by the Proxy, enabling GraphQL access to APIs requiring auth for schema introspection.


## Proxy errors and extensions from upstream.

For remote schemas it is now possible to enable proxying of GraphQL errors and extensions.

Because proxy mechanism uses the strategy pattern, it's also possible to customize how proxied data appears in a final JSON with query's result.


## Fields dependencies

Field's dependencies are additional fields that should be retrieved from the upstream GraphQL API when given field is requested.

This feature is useful when final schema includes new fields that should be resolved from other fields, which themselves shouldn't be included in the final schema.


## CHANGELOG

- Added `CacheSerializer`, `NoopCacheSerializer` and `JSONCacheSerializer`. Changed `CacheBackend`, `InMemoryCache`, `CloudflareCacheBackend` and `DynamoDBCacheBackend` to accept `serializer` initialization option.
- Fixed schema proxy returning an error when variable defined in an operation is missing from its variables.
- Fixed query `union` fields support.
- Improved custom headers handling in `ProxyResolver` and `ProxySchema`.
- Proxy errors and extensions from upstream.
- Added fields dependencies configuration option to `ProxySchema`.

0 comments on commit 93688f2

Please sign in to comment.