You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
that you can import in [Postman](https://www.getpostman.com/) and send requests that I already created for you.
63
63
64
64
But if you prefer using something new, cool and writing queries on your own with help of autocomplete, then just start rails app, open your favorite browser and navigate to http://localhost:3000/graphiql
65
+
65
66
GraphiQL is an in-browser IDE for exploring GraphQL. You can read more about GraphiQL in this [post](https://medium.com/the-graphqlhub/graphiql-graphql-s-killer-app-9896242b2125) that Clay Allsopp wrote.
67
+
66
68
By the default for this project graphiql is set to do the quering only, but if you want do see how mutations work then open routes.rb file in root_foler/config and change line 9, graphql_path to '/graphql/mutations' and restart the app.
67
69
68
70
69
71
<h2> A bit more about the project... </h2>
70
72
For GraphQL I've used a standard [graphql-ruby](https://github.com/rmosolgo/graphql-ruby) gem. All of GraphQL configuration files can be found in app/models/graph folder.
73
+
71
74
For communication between client and server this app uses [apollo-client](https://github.com/apollographql/apollo-client).
72
75
There is only two queries written for client app, one for quering movies by id and one for creating a new movie.
76
+
73
77
I've added optimistic response to mutation for creating a new movie. Because apollo caches request to make our apps faster and more fluid, we have to tell apollo that mutation happened and that something has changed. You can read more about this subject [here](http://dev.apollodata.com/react/optimistic-ui.html#optimistic-advanced)
0 commit comments