Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add federation #314

Merged
merged 14 commits into from
Apr 12, 2020
Merged

Add federation #314

merged 14 commits into from
Apr 12, 2020

Conversation

paulpdaniels
Copy link
Collaborator

@paulpdaniels paulpdaniels commented Apr 7, 2020

This PR adds federation to caliban. ATM it is still a WIP but I wanted to open the PR early to get feedback on the approach.

More info on the federation spec can be found here.

There are a couple pieces that are still missing in no particular order:

  • Federated schema validation (Handled by the gateway)
  • Error handling (Same as normal graphql)
  • More testing
  • Make EntityResolvers more ergonomic (automatic generation?)
  • Add example
  • Update documentaton
  • Move to a separate package
  • Add stub resolution

build.sbt Outdated Show resolved Hide resolved
@paulpdaniels paulpdaniels changed the title [WIP]: Add federation Add federation Apr 9, 2020
@paulpdaniels paulpdaniels force-pushed the federation-wip branch 2 times, most recently from f4eaa94 to a01dc0a Compare April 9, 2020 16:24
examples/src/main/scala/caliban/ExampleData.scala Outdated Show resolved Hide resolved
vuepress/docs/docs/federation.md Show resolved Hide resolved
vuepress/docs/docs/federation.md Outdated Show resolved Hide resolved
vuepress/docs/docs/federation.md Outdated Show resolved Hide resolved
vuepress/docs/docs/federation.md Outdated Show resolved Hide resolved
vuepress/docs/docs/federation.md Outdated Show resolved Hide resolved
vuepress/docs/docs/federation.md Outdated Show resolved Hide resolved
@paulpdaniels
Copy link
Collaborator Author

@ghostdogpr comments addressed!

Copy link
Owner

@ghostdogpr ghostdogpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some tiny nitpicking comments.
I don't understand 100% of federation but this looks pretty good, in particular the fact you could do it on top of the current implementation without modifying the core much.

examples/src/main/scala/caliban/ExampleData.scala Outdated Show resolved Hide resolved
examples/src/main/scala/caliban/ExampleApi.scala Outdated Show resolved Hide resolved
To use, add the following line to your `build.sbt` file:

```
libraryDependencies += "com.github.ghostdogpr" %% "caliban-federation" % "0.7.3"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make it 0.7.4? So that next time I release, a find & replace will find it 😄

@ghostdogpr
Copy link
Owner

All good, thanks for adding this!

@ghostdogpr ghostdogpr merged commit 3316684 into ghostdogpr:master Apr 12, 2020
@paulpdaniels paulpdaniels deleted the federation-wip branch April 12, 2020 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants