-
-
Notifications
You must be signed in to change notification settings - Fork 753
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
Mutation example needed #262
Comments
I know the relay mutations on the frontend side are not in this project yet, but if you are wondering about the backend mutations to go with this you can find them here https://github.com/kriasoft/nodejs-api-starter/tree/master/src/schema |
Thanks, I appreciate the link. The back-end honestly is just so much more straightforward and testable. The front-end is, however, pure black magic, to the point where I'm starting to doubt whether Relay is a good framework to move forward with. Support on the FB side seems nonexistent which is a real shame. Thanks again for your help though. |
Relay mutations on the frontend are actually alot easier then most think once you get one working. After that it is mostly copy paste and change a few fields. Ill post a link to my static-boilerplate here when I finish hooking up my frontend. If you want to see my old project with relay mutations here was a base project I had working (based on react-starter-kit) https://github.com/DaveyEdwards/myiworlds/tree/master/src/routes/createCircle (I was trying many things in there so the project is quite messy). Is there something in particular that confuses you about relay? If your building something that you wish to be very performant for global scale Id recommend keeping with it until something blows it out of the water :) |
Thanks @DaveyEdwards, I appreciate your offer of help, and the link to your repo. My plight is documented in this issue - facebook/relay#2178, and my actual repo that is based on react-static-boilerplate is here - https://github.com/llevar/react-test2/tree/master/src/Home, it basically has to do with updating the store after the mutation succeeds on the server. I also am not sure I really understand how one is meant to implement a page that features a list of objects that don't really have a parent in the object model. All of the Relay examples I have seen that feature a list are implementing a one-to-many relationship using a Connection, but my use case has a list that is top-level. I'm still implementing it using a Connection which maybe isn't right, but I'm not sure how one is supposed to do it otherwise. I honestly think this is a basic enough use case that there should be more than one working example out there already - a page with a table, where you can do CRUD on its rows and it dynamically updates. But so far no dice. I'd be much obliged if you have any ideas... |
I tried to look through your problem, but am unable to offer any advice. I havn't touched relay mutations in a little while so its not fresh in my mind. It looks like your doing things right, except I have never done anything with the connection like client:root:allWorkflows{"first":50}". |
Hi @llevar , have You resolved Your problem with list update after mutation? I deal with similar use case and wonder if You can provide any clue 😉 |
Having the same blocker here in 2019. Will see if I can get something to work. |
You may find some examples here:
|
This is a great boilerplate, but it bills itself as not only being for static sites but also for single-page-applications, thus it would be nice to see examples of full object CRUD. I would be very grateful if you could work the Create, Update, and Delete mutations on Story into this current framework.
The text was updated successfully, but these errors were encountered: