Skip to content

Commit d9c57d3

Browse files
committed
Merge remote-tracking branch 'origin/codedmart/updates' into feat/allow-custom-ca
2 parents 22dcd38 + 5f7fe99 commit d9c57d3

24 files changed

Lines changed: 4890 additions & 151 deletions

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
## [0.3.1]
1111

1212
- Add support for custom CA certificates and allow skipping TLS verification entirely
13+
- Breaking: GraphQL `interface` and `union` output types are now lowered into tagged-variant NDC object types by default.
14+
- Lowered object types include `__typename` and one nullable field per concrete type (`on_<ConcreteType>`).
15+
- Query generation translates tagged variant selections to GraphQL inline fragments (`... on <ConcreteType>`).
16+
- Validation now fails early with clear errors for unsupported polymorphic schemas (for example unions/interfaces without concrete object members, or unresolved type references).
1317

1418
## [0.3.0]
1519

‎README.md‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ Below, you'll find a matrix of all supported features for the GraphQL connector:
4747
| Header Passthrough | ✅ | Entire headers can be forwarded |
4848
| Request-level Arguments | ✅ | Support dynamic headers from the from Pre-NDC Request Plugin |
4949
| Subscriptions | ❌ | |
50-
| Unions | ❌ | Can be brought in via scalar types |
51-
| Interfaces | ❌ | |
50+
| Unions | ✅ | Lowered to tagged-variant object types (`__typename`, `on_<Type>`) |
51+
| Interfaces | ✅ | Lowered to tagged-variant object types (`__typename`, `on_<Type>`) |
5252
| Relay API | ❌ | |
5353
| Directives | ❌ | @cached, Apollo directives |
5454

@@ -57,6 +57,10 @@ Below, you'll find a matrix of all supported features for the GraphQL connector:
5757
* Error formatting
5858
- The format of errors from the connector does not currently match V2 error formatting
5959
- No "partial error" or "multiple errors" responses
60+
* Polymorphic output lowering
61+
- GraphQL `interface` and `union` outputs are lowered into synthetic object types in NDC metadata.
62+
- Lowered object types expose `__typename` plus one nullable tagged field per concrete type: `on_<ConcreteType>`.
63+
- When lowering is not possible (for example no concrete object members), config/schema validation fails with a targeted error.
6064
* Pattern matching in request header forwarding configuration
6165
- This uses simple glob patterns
6266
- More advanced matching and extraction is not currently supported
@@ -71,11 +75,11 @@ Please see the [relevant documentation](https://hasura.info/graphql-getting-star
7175
## Advanced Features
7276

7377
### Forward Headers from Pre-NDC Request Plugin
74-
78+
7579
You can use a [Pre-NDC Request Plugin](https://hasura.io/docs/3.0/plugins/introduction#pre-ndc-request-plugin) to modify the request, and add dynamic headers in runtime via `request_arguments.headers` field, which is a string map. Those headers will be merged into the HTTP request headers before being sent to external services.
7680

7781
> See the full example at [Pre-NDC Request Plugin Request](https://hasura.io/docs/3.0/plugins/introduction#example-configuration)
78-
82+
7983
```json
8084
{
8185
// ...
@@ -104,4 +108,4 @@ The connector uses `rustls` for TLS which does not automatically pick up system
104108
**Notes:**
105109
- `GRAPHQL_CA_CERT_FILE` and `GRAPHQL_CA_CERT_DIR` can be used together (certificates are combined)
106110
- `GRAPHQL_INSECURE_SKIP_TLS_VERIFY` takes precedence and skips all CA cert logic when enabled
107-
- **Warning:** Disabling TLS verification is insecure and should only be used for development/testing
111+
- **Warning:** Disabling TLS verification is insecure and should only be used for development/testing

0 commit comments

Comments
 (0)