Open itsezc opened 5 years ago
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.
Apollo Federation has a known bug with directives which might prevent this without a workaround.
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.
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.
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.
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.
I've been researching the topic over the last few days.
Spec: https://www.apollographql.com/docs/apollo-server/federation/federation-spec/
Thread: https://github.com/graphile/postgraphile/issues/1094 Project: https://github.com/graphile/federation
Finally, I found this really interesting project: https://github.com/0xR/graphql-transform-federation test project: https://github.com/0xR/graphql-transform-federation-blog
@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 ?
Thnks
@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 https://github.com/apollographql/apollo-server/pull/3013 to be resolved
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?