Changes in 5.1.0
Announcing GraphQL and Apollo Federation support
We're happy to announce that AMF now supports GraphQL APIs and Apollo Federation APIs for all its operations (parsing, transformation, validation, rendering).
We've worked hard to integrate all GraphQL features into our model, up to the October 2021 GraphQL Spec.
How to use GraphQL in AMF
To use these new features you only need to:
- create a new
GraphQLConfiguration.GraphQL()
- create a client
graphqlConfig.baseUnitClient()
- use this client to parse, transform, validate and render GraphQL APIs
There are multiple examples of GraphQL parsing in Scala, Java, and TypeScript in the GraphQL Parsing section of the AMF Documentation.
Apollo Federation
We've also added support for GraphQL APIs compliant with the Apollo Federation v2 Spec.
These APIs require a different configuration called GraphQLFederationConfiguration.GraphQLFederation()
to differentiate them from plain GraphQL APIs.
We've detailed exactly what is supported and how it works in the GraphQL Federation section of the AMF Documentation.
Resources
Specification | Configuration | More information |
---|---|---|
GraphQL | GraphQLConfiguration |
GraphQL Parsing |
Apollo Federation | GraphQLFederationConfiguration |
GraphQL Federation |
What's Changed
- W-11580922: validate required fields by @arielmirra in #1542
- W-11349298: Split duplicated paths detection logic by @hghianni in #1546
- W-11618110: return a new error handler in every request to the eh provider in shape validation by @arielmirra in #1548
- W-11495708 - Fixed search of JSON declared node with encodeable chars by @looseale in #1549
- Directives emission by @hghianni in #1553
- Add properties field in oas parser if properties entry is present by @pope1838 in #1554
- graphql 2021 by @nschejtman in #1555
- some fixes by @nschejtman in #1561
- W-11581261: Add link directive to GraphQL Federation by @hghianni in #1563
- GraphQL Fixes by @hghianni in #1565
- W 11460908 by @nschejtman in #1566
- W-11086896: add @key validations for graphql federation by @arielmirra in #1564
- W-11574054: test interfaces that implement interfaces + other fixes by @arielmirra in #1567
- W-11558453, W-11558514: added OAS Component classes, plugin, parser, … by @looseale in #1570
- W-11469432: add test to check tracked element cloning by @pope1838 in #1571
- W-11558453, W-11558514: revert NamedDomainElement name change in plat… by @looseale in #1573
- W-11574022: test covariance in a chain of interfaces by @arielmirra in #1568
- W-11558604: added support for oas3 components document indexing by @tomsfernandez in #1572
- fix: removed com.sun.tools import by @tomsfernandez in #1575
- W-11574043: add repeatable directive emission by @arielmirra in #1574
- W 11574036 by @nschejtman in #1577
- W 11645489 - Added references to JSON Schema Document by @looseale in #1578
- W-11574070: add matrix initial support & examples to graphql tck by @arielmirra in #1580
- W 11542569 by @nschejtman in #1576
- W-11646230: Add ANTLR errors to Parse report by @hghianni in #1579
- Adopt NpmOpsPlugin changes from amf-antlr-ast by @nschejtman in #1582
- W 11690311 by @hghianni in #1583
- argument parsing and rendering by @nschejtman in #1581
- W-11690333: fix schema emission logic, update dumped graphql goldens by @arielmirra in #1584
- W-11718652 (fix): implemented max json depth level for application/json strict validation by @tomsfernandez in #1586
- W 11691599 by @nschejtman in #1587
- W 11460908: bunch of GraphQL fixes (pack 1) by @nschejtman in #1588
- W 11740498 by @nschejtman in #1589
- W-11748903: Add description to directive args & fix directive descrip… by @hghianni in #1590
- W-11721862: validate cyclic inheritance in GraphQL by @arielmirra in #1593
- W-11460908: bump AMF model -> 3.7.0 by @nschejtman in #1596
- W-11558572 - Added tests for cross-spec validation and updated OAS Co… by @looseale in #1591
- W-11517554 - Update typings by @looseale in #1598
Full Changelog: 5.0.12...5.1.0