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

fix: initialize resolveReferences object and add type info to nodeId resolution #11

Merged
merged 2 commits into from
Aug 1, 2022

Conversation

mgagliardo91
Copy link
Contributor

This PR fixes two minor bugs with the current federation plugin and adds tests to validate bi-directional federation with postgraphile.

The two main bugs were:

  1. resolveReferences on the build object for the plugin was not initialized and would throw an error when doing a lookup for in the entities resolver
  2. Type information was not being added to entities that were resolved by nodeId link

While updating the PR, I added some docker support for simplifying the test suite so that individuals would not have to have postgres installed on their machines. This can be removed from this PR, if desired.

The test updates should now check bi-directional federation:

  • Extending a postgraphile entity (existing)
  • Federating to a postgraphile entity by nodeId
  • Federating to a postgraphile entity by primary key (in this case id)

@mgagliardo91
Copy link
Contributor Author

@jarvisuser90 thanks for owning the more current fork of https://github.com/graphile/federation . I was able to get it working with the latest release of Apollo Federation with a few minor changes. Let me know if there is any specific contribution requests you would prefer to see.

@mgagliardo91
Copy link
Contributor Author

@jarvisuser90 are you still active in this repo?

@johnciprian johnciprian merged commit bb3c403 into brooklyn-labs:main Aug 1, 2022
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