Kadira's Learn GraphQL Project

I am reasonably sure that in Meteor this will actually cause some performance issues. Live queries on the database are deduplicated internally, but they can’t be if they are all slightly different.

There is a huge advantage to having a smaller number of pre-defined queries. In fact, I think this is one of the reasons they are having trouble implementing realtime functionality for GraphQL.

I think the ideal solution for this would be to compile all GraphQL queries at compile-time, and deduplicate them into the smallest possible number of actual database queries. Then you can have the advantage of writing code with GraphQL, but none of the issues of actually accepting arbitrary queries at runtime.

1 Like