cult-of-coders / grapher

Grapher: Meteor Collection Joins + Reactive GraphQL like queries
https://atmospherejs.com/cultofcoders/grapher
MIT License
275 stars 53 forks source link

Global queries from the client should work even if collection is not imported on the client #432

Closed Floriferous closed 4 years ago

Floriferous commented 4 years ago

I noticed that you can't run a global query from the client, if the client doesn't have this collection imported.

createQuery({ todos: { title: 1 } });

// With collection imported
method -> exposure_todos

// Without collection imported, results in 404
method -> named_query_todos

You shouldn't have to import an entire collection on the client for a query to work. I understand that reactive queries don't work, but at least static queries should.

theodorDiaconu commented 4 years ago

Understand the perspective, however doing this will break a lot of things. You can create a "LocalCollection" for this to work. Sorry we can't make this work-around.