-
Notifications
You must be signed in to change notification settings - Fork 5
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
Initial mutations implementation #1
Conversation
@dOrgJelli Could we squash all of these commits into a single one, with a decent commit message? |
@Jannis is this better? |
Also side note: |
@dOrgJelli Now the commit message is too long 😉 How about "Initial implementation with Apollo support"? |
Sure thing, will update shortly 😊 hopping on a flight to Denver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few general notes:
- Let's drop the
@client
directive everywhere. Apollo warns if you use it wthout Apollo client-side resolvers. - The tests checking whether
useMutation
and<Mutation />
set the observer object seem superfluous. - The files in this repo are formatted inconsistently. Please run Prettier over all of them.
- Error messages sometimes end with a
.
and sometimes they don't. Let's remove all.
s. - Can we drop the
_
on private / internal fields? Underscores are primarily used for indicating unused variables these days. Besides, they are not pretty. 😉
From what we've found, when executing the query using ApolloClient, the @client directive is required. If it isn't the resolver will not be found. We thought about adding @client behind the scenes inside of the localResolverExecutor, but the document's directives are const/uneditable.
I'd like to keep these as it's the only e2e verification we have for the state observer.
Fixed :)
Fixed :) |
That's because in the |
What really needs to happen for mutations to be agnostic of Apollo is:
It is clear that this is too late for ETHDenver, so we're going to have to accept the |
cache.writeData({ | ||
data: { | ||
getTodos: [], | ||
}, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed for anything, so could be dropped.
@dOrgJelli @namesty Something's up with Travis, I reckon the TypeScript config for CI is broken a little. |
Pushed a fix for Travis. |
I'm going to go ahead and merge it. CI will pass, apart from the book deployment for the docs, which are empty right now anyway. |
No description provided.