Skip to content

Commit

Permalink
feat: Add support for value types in federation (apollographql/apollo…
Browse files Browse the repository at this point in the history
…-server#3063)

Value types are type definitions that live on multiple services (more specifically - types, inputs, interfaces, and unions). We've seen the desire internally and within the community to support the idea of a common type that multiple services can reference. A value type is identical by name, kind, and fields across all services.

In order to accomplish this, we've extended two of the existing validators: one for type names, and the other for field names. The changes to the validators permit duplicate type names and fields in the case that we've encountered a value type. The validators also provide some actionable, user-friendly errors in the case that we encounter a kind or field type mismatch.
Apollo-Orig-Commit-AS: apollographql/apollo-server@cca20d9
  • Loading branch information
trevor-scheer authored and abernix committed Jul 28, 2019
1 parent 1622743 commit 8c60ee7
Show file tree
Hide file tree
Showing 17 changed files with 1,901 additions and 298 deletions.
3 changes: 2 additions & 1 deletion federation-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"dependencies": {
"apollo-env": "^0.5.1",
"apollo-graphql": "^0.3.3",
"apollo-server-env": "file:../apollo-server-env"
"apollo-server-env": "file:../apollo-server-env",
"lodash.xorby": "^4.7.0"
},
"peerDependencies": {
"graphql": "^14.0.2"
Expand Down
Loading

0 comments on commit 8c60ee7

Please sign in to comment.