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
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@
5
5
This simple app represent an example of how GraphQL queries and mutations can be implemented. I used Movies as entity, and have only implemented Create and Read operations. Rest of operations (update, delete) can be done based on these two.
6
6
7
7
<h2> Installation and configuration </h2>
8
+
8
9
What will you need to get this thing running:
9
10
10
11
Ruby: 2.3.1
@@ -31,6 +32,7 @@ Next thing is to put some initial data in your db. I've prepared top 5 rated mov
31
32
Run ```rake db:seed``` to populate Movies table, and then ```rails s``` to start server at http://localhost:3000
32
33
33
34
This project supports both, server-side and client-side rendering. If you want to continue with developemnt of this project I would recommend client-side rendering.
35
+
34
36
<h4>Option #1: Client-side rendering</h4>
35
37
36
38
Position yourself to root_folder/client/movie_reactjs_apollo/ and type
@@ -55,12 +57,13 @@ npm run build
55
57
and node will do optimization of the files and export reactjs application to public folder of Rails application. Then just start Rails app and you will have server and client running at the same address, http://localhost:3000
56
58
57
59
<h4>Option #3: Not interested in client app? Not a problem, I've got you covered.</h4>
60
+
58
61
If you like using [Postman](https://www.getpostman.com/) I have just a thing for you.
59
62
In root folder of project there is a file named
60
63
```
61
64
RailsGraphQL.postman_collection.json
62
65
```
63
-
that you can import in [Postman](https://www.getpostman.com/) and send requests that I already created for you.
66
+
that you can import in Postman and send requests that I already created for you.
64
67
65
68
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
66
69
@@ -70,6 +73,7 @@ By the default for this project graphiql is set to do the quering only, but if y
70
73
71
74
72
75
<h2> A bit more about the project... </h2>
76
+
73
77
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.
74
78
75
79
For communication between client and server this app uses [apollo-client](https://github.com/apollographql/apollo-client).
0 commit comments