Chimp 4.0 - resolvers for extended federated types

The Chimp 3.0 and previous versions always generated resolveReferences resolvers for all federated types - the types that were annotated with @key, like so:

extend type SomeFederatedType @key(fields: "uuid") { }

Add @compute now to it to keep the previous functionality:

make sure your chimp-graphql-codegen-plugin version dependency is at least 0.2.0

We've noticed that that resolver was frequently unused and left a significant amount of unnecessary code in projects (resolvers + tests).

If you want to keep the previous functionality, mark all federated types with @compute.

extend type SomeFederatedType @key(fields: "uuid") @computed { }

If you do have unnecessary files produced by previous versions of chimp you can remove them now safely.

Make sure your chimp-graphql-codegen-plugin version dependency is at least 0.2.0, otherwise the codegen tool will complain that you are using the @computed directive incorrectly.

Let me know if you have any questions or thoughts in the comments below.

Let us help you on your journey to Quality Faster

We at Xolvio specialize in helping our clients get more for less. We can get you to the holy grail of continuous deployment where every commit can go to production — and yes, even for large enterprises.

Feel free to schedule a call or send us a message below to see how we can help.

User icon
Envelope icon


Book a call
Loading Calendly widget...
  • Add types to your AWS lambda handler

    Lambdas handlers can be invoked with many different, but always complex, event arguments. Add to that the context, callback, matching return type and you basically start listing all the different ways that your function can fail in production.

  • How to expose a local service to the internet

    From time to time you might need to expose your locally running service to the external world - for example you might want to test a webhook that calls your service. To speed up the test/development feedback loop it would be great to be able to point that webhook to your local machine.

  • For loops in JavaScript (vs _.times)

    From time to time I still see a for loop in JavaScript codebases. Linters are frequently angry about them. Let's see how we can replace them.