Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bb4a3b9

Browse files
committed
Added client application
1 parent eab1a90 commit bb4a3b9

File tree

23 files changed

+2442
-160
lines changed

23 files changed

+2442
-160
lines changed

‎.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@
1919

2020
# Ignore Byebug command history file.
2121
.byebug_history
22+
23+
.idea/*

‎.idea/misc.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/workspace.xml

Lines changed: 258 additions & 158 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎app/models/graph/mutations/new_movie_mutation.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ module Mutations
55
description 'Mutation for creating a new movie'
66

77
input_field :title, !types.String
8-
input_field :rating, types.Float
8+
input_field :rating, types.String
99
input_field :genre, types.String
1010
input_field :duration, types.String
1111
input_field :description, types.String
12+
input_field :released_date, types.String
1213

1314
return_field :movie, Graph::Types::MovieType
1415

1516
resolve(->(_, input, ctx){
16-
movie = Movies.create(input.to_h)
17+
inputs = input.to_h
18+
if input[:rating]
19+
inputs['rating'] = input[:rating].to_f
20+
end
21+
movie = Movies.create(inputs)
1722
{ movie: movie }
1823
})
1924

‎client/movies_reactjs_apollo/.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
12+
# misc
13+
.DS_Store
14+
.env
15+
npm-debug.log*
16+
yarn-debug.log*
17+
yarn-error.log*
18+

‎client/movies_reactjs_apollo/README.md

Lines changed: 1623 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "movies_reactjs_apollo",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"flux": "^3.1.2",
7+
"react": "^15.4.2",
8+
"react-apollo": "^1.0.0",
9+
"react-dom": "^15.4.2",
10+
"react-router": "^3.0.3"
11+
},
12+
"devDependencies": {
13+
"react-scripts": "0.9.5"
14+
},
15+
"scripts": {
16+
"start": "react-scripts start",
17+
"build": "react-scripts build",
18+
"test": "react-scripts test --env=jsdom",
19+
"eject": "react-scripts eject"
20+
}
21+
}
24.3 KB
Binary file not shown.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
7+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">
8+
<!--
9+
Notice the use of %PUBLIC_URL% in the tag above.
10+
It will be replaced with the URL of the `public` folder during the build.
11+
Only files inside the `public` folder can be referenced from the HTML.
12+
13+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
14+
work correctly both with client-side routing and a non-root public URL.
15+
Learn how to configure a non-root public URL by running `npm run build`.
16+
-->
17+
<title>React App</title>
18+
</head>
19+
<body>
20+
<div id="root"></div>
21+
<!--
22+
This HTML file is a template.
23+
If you open it directly in the browser, you will see an empty page.
24+
25+
You can add webfonts, meta tags, or analytics to this file.
26+
The build step will place the bundled scripts into the <body> tag.
27+
28+
To begin the development, run `npm start`.
29+
To create a production bundle, use `npm run build`.
30+
-->
31+
</body>
32+
</html>
189 KB
Loading[フレーム]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /