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

Apollo Federation and ArangoSearch #101

Open
itsezc opened this issue Sep 29, 2019 · 9 comments
Open

Apollo Federation and ArangoSearch #101

itsezc opened this issue Sep 29, 2019 · 9 comments
Labels
question Further information is requested

Comments

@itsezc
Copy link

itsezc commented Sep 29, 2019

Is Cruddl compatible with Apollo Federation? if so are there any working examples of it?

And also, is there any plans to support ArangoSearch in the future?

@itsezc itsezc changed the title Apollo Federation Apollo Federation and ArangoSearch Oct 2, 2019
@Yogu
Copy link
Member

Yogu commented Oct 2, 2019

I don't think there is anything preventing you from embedding a cruddl-generated schema into Apollo Federation, but it might be a little tricky to incorporate all the features. I haven't used it myself, but as far as I understand, it needs a SDL of all federated schemas that can include some directives defined by Apollo. If you don't need any special directives in the cruddl schema, this should not be a problem. However, if you want to add directives, you would need to add them programatically to a SDL generated from the cruddl-generated schema.

And also, is there any plans to support ArangoSearch in the future?

Yes, and it's already implemented, but not released yet. If you want to test it, you can use cruddl@1.1.0-alpha.0.

@Yogu Yogu added the question Further information is requested label Oct 2, 2019
@robross0606
Copy link

robross0606 commented Oct 2, 2019

Apollo Federation has a known bug with directives which might prevent this without a workaround.

@Yogu
Copy link
Member

Yogu commented Oct 2, 2019

My suggestion would be to use printSchema on the cruddl-generated schema which does not have any directives, so custom cruddl directives shouldn't be a problem.

@robross0606
Copy link

The suggested workaround using mergeSchema() does also appear to work if needed for some reason. I've tested it with (non-cruddl) custom directives on our federation.

@itsezc
Copy link
Author

itsezc commented Oct 5, 2019

The suggested workaround using mergeSchema() does also appear to work if needed for some reason. I've tested it with (non-cruddl) custom directives on our federation.

Yup, tried it with printSchema works like a charm (:

Will be playing around with Foxx and Cruddl together and see how well they go together

Also OFT: I've submitted Cruddl to https://stackshare.io would be nice to have a logo as its an opportunity to increase awareness.

@orefalo
Copy link

orefalo commented Oct 22, 2019

Looks like we are trying to do the same thing. DevOps setup - each domain maintained by a team, arango+cruddl for fast/simple code generation. federation at the top.

@orefalo
Copy link

orefalo commented Nov 2, 2019

I've been researching the topic over the last few days.

Official Spec

Spec: https://www.apollographql.com/docs/apollo-server/federation/federation-spec/

Postgraphile implementation of federation

Thread: graphile/crystal#1094
Project: https://github.com/graphile/federation

Interesting

Finally, I found this really interesting project:
https://github.com/0xR/graphql-transform-federation
test project: https://github.com/0xR/graphql-transform-federation-blog

@dijbi
Copy link

dijbi commented Apr 15, 2020

@itsezc :

Yup, tried it with printSchema works like a charm (:

I can not figure out how to use printSchema for that matter ... could you explain ?

  • The output of printSchema being a string in Schema Langage, how to add dynamically the
    @keys(fields),extend type.....
  • or do you save it in a separate file then change it to be Apollo Federation compatible ?

Thnks

@itsezc
Copy link
Author

itsezc commented Apr 16, 2020

@itsezc :

Yup, tried it with printSchema works like a charm (:

I can not figure out how to use printSchema for that matter ... could you explain ?

  • The output of printSchema being a string in Schema Langage, how to add dynamically the
    @keys(fields),extend type.....
  • or do you save it in a separate field then change it to be Apollo Federation compatible ?

Thnks

The latter, however it's pretty hacky but need not worry we just have to wait for apollographql/apollo-server#3013 to be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants