Max Rozen

How to fix 'rule is not a function' error

June 15, 2018 • ☕️ 1 min read

We recently had this really descriptive error at work: rule is not a function

The error boils down to Facebook engineers breaking compatibility with graphql 0.12.x in certain versions of Relay.

The fix

Bump your GraphQL and Relay versions - in package.json we set our versions to:

  • graphql to 0.13.2
  • relay to 1.6

Source: https://github.com/facebook/relay/issues/2428

Discuss on TwitterEdit on GitHub

Enjoyed this post? Receive the next one in your inbox!

I won't send you spam.

Unsubscribe at any time.

MaxRozen.com

Max Rozen

Thoughts by Max Rozen.

I specialise in GraphQL and Frontend.
I also run OnlineOrNot, a GraphQL monitoring service.