Skip to content

Commit 92b49dd

Browse files
committed
feat: customize for pokeapi
1 parent 2877840 commit 92b49dd

File tree

14 files changed

+7489
-8722
lines changed

14 files changed

+7489
-8722
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
static/dist

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
FROM node:8.9-alpine
1+
FROM node:12-alpine
22

33
# Create app directory
44
WORKDIR /app
55

66
# Install app dependencies
7-
RUN npm config set unsafe-perm true
7+
# RUN npm config set unsafe-perm true
88
RUN npm -g install serve
99
# A wildcard is used to ensure both package.json AND package-lock.json are copied
1010
COPY package*.json ./
1111

12-
RUN npm install
12+
RUN npm ci
1313

1414
# Bundle app source
1515
COPY . /app

LICENSE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Hasura
3+
Copyright (c) 2020 PokeAPI
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,5 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22+
23+
The code has been forked from https://github.com/hasura/graphiql-online (2877840f53c9e0a94966dfaa78c07312bd6f9ffd) which has been licensed with a MIT license.

package-lock.json

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

package.json

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"start-dev": "better-npm-run start-dev",
2222
"watch-client": "better-npm-run watch-client",
2323
"dev": "concurrently --kill-others \"npm run watch-client\" \"npm run start-dev\" ",
24-
"deploy": "now"
24+
"deploy": "now",
25+
"serve": "serve -s static -p 8082"
2526
},
2627
"betterScripts": {
2728
"start-prod": {
@@ -40,42 +41,42 @@
4041
}
4142
},
4243
"dependencies": {
43-
"apollo-link": "^1.2.2",
44-
"apollo-link-ws": "^1.0.8",
44+
"apollo-link": "^1.2.14",
45+
"apollo-link-ws": "^1.0.20",
4546
"graphiql": "^0.13.2",
4647
"graphiql-explorer": "^0.6.2",
47-
"graphql": "^14.3.0",
48-
"graphql-voyager": "^1.0.0-rc.27",
48+
"graphql": "^14.7.0",
49+
"graphql-voyager": "1.0.0-rc.31",
4950
"hasura-console-graphiql": "0.1.0-alpha.1",
50-
"history": "^3.0.0",
51+
"history": "^3.3.0",
5152
"isomorphic-fetch": "^2.2.1",
52-
"jsonwebtoken": "^8.5.0",
53-
"less": "^3.7.1",
54-
"lru-memoize": "^1.0.0",
53+
"jsonwebtoken": "^8.5.1",
54+
"less": "^3.13.1",
55+
"lru-memoize": "^1.1.0",
5556
"map-props": "^1.0.0",
5657
"match-sorter": "^2.3.0",
5758
"multireducer": "^1.0.2",
5859
"piping": "^0.3.2",
59-
"prettier": "^1.16.4",
60+
"prettier": "^1.19.1",
6061
"pretty-error": "^1.2.0",
61-
"prop-types": "^15.6.0",
62-
"react": "16.8.2",
63-
"react-ace": "^6.1.1",
64-
"react-bootstrap": "^0.32.1",
65-
"react-copy-to-clipboard": "^5.0.0",
66-
"react-dom": "16.8.2",
67-
"react-helmet": "^5.2.0",
62+
"prop-types": "^15.7.2",
63+
"react": "17.0.1",
64+
"react-ace": "^6.6.0",
65+
"react-bootstrap": "^0.32.4",
66+
"react-copy-to-clipboard": "^5.0.3",
67+
"react-dom": "17.0.1",
68+
"react-helmet": "^5.2.1",
6869
"react-notification-system": "^0.2.17",
6970
"react-progress-bar-plus": "^1.3.1",
70-
"react-redux": "^5.0.6",
71-
"react-router": "^3.2.0",
71+
"react-redux": "^5.1.2",
72+
"react-router": "^3.2.6",
7273
"react-router-redux": "^4.0.8",
73-
"react-tabs": "^2.1.0",
74-
"redux": "^4.0.0",
74+
"react-tabs": "^2.3.1",
75+
"redux": "^4.0.5",
7576
"redux-logger": "^3.0.6",
76-
"redux-thunk": "^2.2.0",
77+
"redux-thunk": "^2.3.0",
7778
"semver": "5.5.1",
78-
"subscriptions-transport-ws": "^0.9.12",
79+
"subscriptions-transport-ws": "^0.9.18",
7980
"valid-url": "^1.0.9"
8081
},
8182
"devDependencies": {
@@ -132,7 +133,7 @@
132133
"json-loader": "^0.5.4",
133134
"less-loader": "^4.1.0",
134135
"lint-staged": "^6.1.1",
135-
"mini-css-extract-plugin": "^0.4.0",
136+
"mini-css-extract-plugin": "^0.4.5",
136137
"node-sass": "^4.14.0",
137138
"nyc": "^13.3.0",
138139
"optimize-css-assets-webpack-plugin": "^4.0.2",

src/components/Common/Common.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ code {
12611261
}
12621262

12631263
.graphQLHeight {
1264-
height: 72vh;
1264+
height: 79vh;
12651265
margin-bottom: 50px;
12661266
}
12671267

src/components/Services/ApiExplorer/ApiExplorer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ApiExplorer extends Component {
5353
request={displayedApi.request}
5454
route={route}
5555
dataHeaders={dataHeaders}
56-
numberOfTables={0}
56+
numberOfTables={1}
5757
headerFocus={headerFocus}
5858
queryParams={this.props.location.query}
5959
graphqlEndpoint={localStorageUrl}

src/components/Services/ApiExplorer/ApiRequest/ApiRequest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class ApiRequest extends Component {
171171

172172
return (
173173
<CollapsibleToggle
174-
title={'GraphQL Endpoint'}
174+
title={'PokeAPI GraphQL Endpoint'}
175175
isOpen={endpointSectionIsOpen}
176176
toggleHandler={toggleHandler}
177177
useDefaultTitleStyle

src/components/Services/ApiExplorer/ApiRequest/ApiRequestDetails.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ class ApiRequestDetails extends Component {
66
const styles = require('../ApiExplorer.scss');
77
return (
88
<div className={styles.apiRequestWrapper + ' ' + styles.apiContentPadd}>
9-
<div className={styles.apiRequestContent}>{this.props.description}</div>
9+
<div className={styles.apiRequestContent}>PokeAPI GraphiQL interface</div>
1010
<div className={styles.built}>
11-
Built with <i className="fa fa-heart" /> by <a href={'http://hasura.io/'} target={'_blank'}>Hasura</a>
11+
A rate limit of 50 calls per day is enforced
1212
</div>
1313
<div className={styles.apiHasura}>
14-
<a href="https://github.com/hasura/graphql-engine/tree/master/community/tools/graphiql-online" target={'_blank'}>
14+
<a href="https://github.com/PokeAPI/pokeapi" target={'_blank'}>
1515
<i className="fa fa-github" />
1616
</a>
1717
</div>

src/components/Services/ApiExplorer/ApiRequest/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const setHeadersSectionIsOpen = isOpen => {
1717
};
1818

1919
export const getHeadersSectionIsOpen = () => {
20-
const defaultIsOpen = true;
20+
const defaultIsOpen = false;
2121

2222
const isOpen = window.localStorage.getItem(
2323
'ApiExplorer:HeadersSectionIsOpen'

0 commit comments

Comments
 (0)