-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Object Extensions #5
Comments
Hi, @zvictor! If you were able to extend from the root types ( The former should be a much more straightforward change to implement within Fauna than the latter. |
In short: Yes, extending the root types is enough for now. Either one converting the Long answer: I am in favour of modularised development and I believe nested mutations would play a very important role in the faugra context. If I have a type User {
name
age
changeName(name: String!): String! @resolver(name: "changeAccountsUserName")
} That being said, nested mutations have known dangerous issues and the community has not come to an agreement on it yet:
So, for now, "object extensions" of the root types would be our workaround for this issue. I don't yet see a strong use case for extending other types, such as user-defined types. |
with the migration from @graphql-toolkit to @graphql-tools implemented today, we can now use extend 🎉 |
from http://spec.graphql.org/draft/#sec-Object-Extensions
from https://www.apollographql.com/docs/graphql-tools/generate-schema/#extending-types
In our repo we could see it in action in the modularised example. The
sayHello
resolver is a UDF that belongs to theaccounts
folder, but we need to define it in the roottype Query
because right now we can't extendQuery
anywhere else:https://github.com/zvictor/faugra/blob/6a6446bce541ae1c41e569984b9ff553bc0410c0/examples/modularized/Query.gql#L5
The text was updated successfully, but these errors were encountered: