Skip to content

Commit 6d8a4cd

Browse files
hotfix/improvements (#23)
* Told prettier and eslint to ignore the github actions, they might be causing issues * Added vscode folder and started to fix some resolver bugs * Reworked the single movie resolver and model * Fixed the original language functionality * Updated the resolvers which used the movies model and updated some of the unit tests * Wrapped up the Movie resolver and model improvements * Updated the utils for the Cast, Credits and SocialLinks. * Improved the readability of all tests, reworked some of the resolvers and models * Updated the shows model and resolvers * Added the featuredCrew functionality * Refactored the popular person resolver and model * Updated setSocial link util to support the single person data * Updated the jsdoc documentation * Updated the object names to make them more consistent * Added the episode count functionality, but it needs improving * Refactored the setCast episodeCount functionality and created unit tests for the new functionality * Added role to the resonse for the setCredits * Fixed an with the setCast util. When it failed it returned the incorrect data * Made the utils compatiable with node version 12 * Updated the github actions .yml files * Fixed a github action syntax error * Updated the action names as they were incorrect
1 parent 79eda97 commit 6d8a4cd

File tree

154 files changed

+5001
-3192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+5001
-3192
lines changed

.github/workflows/linting-action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
name: Application Linting
33

44
# When the to run the greeting
5-
on: [pull_request]
5+
on: [pull_request, push]
66

77
# Jobs to run for the action (You can have multiple actions in one file)
88
jobs:
99
run-linters:
1010
# Job display name
11-
name: Linting Action
11+
name: Running the eslint checks
1212

1313
# Runs on a Linux based OS
1414
runs-on: ubuntu-latest
@@ -49,7 +49,7 @@ jobs:
4949
5050
# Installs all the project dependencies e.g. prettier, eslint etc via a custom project script
5151
- name: Install Node.js dependencies
52-
run: npm run all-dependencies
52+
run: npm run allDependencies
5353

5454
# Run the linting action
5555
- name: Run linters

.github/workflows/test-action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Job name
2-
name: Intergration and Unit Tests
2+
name: Integration and Unit Tests
33

44
# When the to run the greeting
5-
on: [pull_request]
5+
on: [pull_request, push]
66

77
# Jobs to run for the action (You can have multiple actions in one file)
88
jobs:
99
test:
1010
# Job display name
11-
name: Running React-Testing-Library and Jest tests
11+
name: Running the jest tests
1212

1313
# Runs on a Linux based OS
1414
runs-on: ubuntu-latest
@@ -20,7 +20,7 @@ jobs:
2020

2121
# Steps involved for this particular task
2222
steps:
23-
# Checks out the reporsitoy and enables the use of commands made avaliable in the project ie npm run
23+
# Checks out the repository and enables the use of commands made available in the project ie npm run
2424
- name: Check out Git repository
2525
uses: actions/checkout@v2
2626

@@ -54,7 +54,7 @@ jobs:
5454
5555
# Installs all the project dependencies e.g. prettier, eslint etc via a custom project script
5656
- name: Install Node.js dependencies
57-
run: npm run all-dependencies
57+
run: npm run allDependencies
5858

5959
# Run the react-testing-library tests
6060
- name: Run all tests

.vscode/extensions.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"esbenp.prettier-vscode",
5+
"VisualStudioExptTeam.vscodeintellicode",
6+
"christian-kohler.npm-intellisense",
7+
"letrieu.expand-region",
8+
"formulahendry.auto-rename-tag",
9+
"christian-kohler.path-intellisense",
10+
"2gua.rainbow-brackets",
11+
"PKief.material-icon-theme",
12+
"orta.vscode-jest",
13+
"kumar-harsh.graphql-for-vscode",
14+
"jpoissonnier.vscode-styled-components",
15+
"ionutvmi.path-autocomplete",
16+
"emmanuelbeziat.vscode-great-icons",
17+
"vincaslt.highlight-matching-tag",
18+
"eamodio.gitlens"
19+
]
20+
}

.vscode/settings.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnSave": true,
4+
"editor.formatOnPaste": true,
5+
"editor.detectIndentation": true,
6+
"editor.fontLigatures": false,
7+
"editor.snippetSuggestions": "top",
8+
"editor.suggest.localityBonus": true,
9+
"editor.acceptSuggestionOnCommitCharacter": false,
10+
"editor.renderWhitespace": "boundary",
11+
"editor.codeActionsOnSave": {
12+
"source.fixAll.eslint": true
13+
},
14+
"editor.cursorSmoothCaretAnimation": true,
15+
"editor.fontSize": 20,
16+
"editor.minimap.enabled": false,
17+
"editor.tabSize": 2,
18+
19+
"files.trimTrailingWhitespace": true,
20+
"files.trimFinalNewlines": true,
21+
22+
"workbench.sideBar.location": "left",
23+
24+
"javascript.updateImportsOnFileMove.enabled": "always",
25+
26+
"files.autoSave": "off",
27+
"files.exclude": {
28+
"USE_GITIGNORE": true
29+
},
30+
"files.defaultLanguage": "{activeEditorLanguage}",
31+
32+
"javascript.validate.enable": true, // Highligts the unused imports when true
33+
"editor.showUnused": true, // Highligts the unused imports when true
34+
35+
"search.exclude": {
36+
"**/node_modules": true,
37+
"**/bower_components": true,
38+
"**/*.code-search": true,
39+
"**/build": true,
40+
"**/.build": true
41+
},
42+
43+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
44+
45+
"javascript.implicitProjectConfig.checkJs": true,
46+
47+
"breadcrumbs.enabled": true,
48+
"grunt.autoDetect": "off",
49+
"npm.runSilent": true,
50+
"explorer.confirmDragAndDrop": true,
51+
52+
"[javascript]": {
53+
"editor.defaultFormatter": "esbenp.prettier-vscode",
54+
"editor.suggestSelection": "recentlyUsedByPrefix",
55+
"editor.suggest.showKeywords": true
56+
},
57+
58+
"[json]": {
59+
"breadcrumbs.showBooleans": true
60+
},
61+
62+
"files.associations": {
63+
"*.react.js": "javascriptreact",
64+
"*.jsx": "javascriptreact",
65+
"*.js": "javascriptreact"
66+
}
67+
}

jsconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
"checkJs": true,
4+
"target": "es5"
5+
},
6+
"exclude": ["node_modules", "**/node_modules/*"]
7+
}
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
const { gql } = require('apollo-server');
22

33
const typeDef = gql`
4-
type CreatedBy {
4+
type BelowsToCollection {
55
id: Int
6-
credit_id: String
76
name: String
8-
gender: Int
9-
profile_path: String
7+
backgroundUrl: String
8+
posterUrl: String
109
}
1110
`;
1211

models/Cast/index.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ const { gql } = require('apollo-server');
22

33
const typeDef = gql`
44
type Cast {
5-
cast_id: Int
6-
character: String
7-
credit_id: String
8-
gender: Int
95
id: Int
10-
name: String
11-
order: Int
12-
image: String
6+
character: String
7+
profileImageUrl: String
8+
gender: String
9+
episodeCount: Int
1310
}
1411
`;
1512

models/Company/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const typeDef = gql`
55
id: Int
66
logo: String
77
name: String
8-
origin_country: String
98
}
109
`;
1110

models/Crew/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@ const { gql } = require('apollo-server');
22

33
const typeDef = gql`
44
type Crew {
5-
credit_id: String
6-
department: String
7-
gender: Int
8-
id: Int
9-
job: String
105
name: String
11-
profile_path: String
6+
roles: String
127
}
138
`;
149

models/Language/index.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)