-
Notifications
You must be signed in to change notification settings - Fork 2
Update GraphiQL to use new API path #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9ee8623
Update configuration
optionsome 3e4a822
Start working on changes to GraphiQL.js.
VillePihlava 8086fca
Fix functionality and add constants.js file.
VillePihlava 0619dbf
Update dependencies and make changes for compatibility.
VillePihlava e78ae13
Fix formatting and format files.
VillePihlava ce3ec95
Start work on updating compatibility with new dependencies.
VillePihlava 346d339
Fix toolbar, fix routes, and other changes.
VillePihlava e1d6365
Change file structure.
VillePihlava baaab73
Change Dockerfile.
VillePihlava cf5ccea
Update compatibility with new version of create-react-app and other c…
VillePihlava d85c4fb
Add rerouting for some undefined paths.
VillePihlava 1b4c9a5
Add favicon.png, fix routing, and fix workflows.
VillePihlava 353dc8b
Remove files.
VillePihlava da2fce7
Change dockerfile and readme.
VillePihlava File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
module.exports = { | ||
parser: '@babel/eslint-parser', | ||
extends: [ | ||
'plugin:compat/recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'airbnb', | ||
'plugin:prettier/recommended', | ||
], | ||
rules: { | ||
curly: ['error', 'all'], | ||
'lines-between-class-members': 'warn', | ||
'no-else-return': 'warn', | ||
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], | ||
'no-console': 'error', | ||
'no-restricted-exports': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
'import/no-named-default': 'off', | ||
'import/extensions': 'off', | ||
// react | ||
'react/button-has-type': 'warn', | ||
'react/destructuring-assignment': 'off', | ||
'react/jsx-filename-extension': ['error', { extensions: ['.js'] }], | ||
'react/jsx-fragments': 'off', | ||
'react/jsx-key': 'error', | ||
'react/jsx-props-no-spreading': 'off', | ||
'react/forbid-prop-types': ['warn', { forbid: ['any', 'array', 'object'] }], | ||
'react/require-default-props': 'warn', | ||
'react/sort-comp': 'off', | ||
'react/state-in-constructor': 'off', | ||
'react/static-property-placement': 'off', | ||
'react/function-component-definition': 'off', | ||
'react/prop-types': 'off', | ||
|
||
// jsx-a11y | ||
'jsx-a11y/anchor-is-valid': [ | ||
'error', | ||
{ | ||
components: ['Link'], | ||
specialLink: ['to'], | ||
aspects: ['noHref', 'invalidHref', 'preferButton'], | ||
}, | ||
], | ||
'jsx-a11y/label-has-associated-control': 'off', // this has a bug with FormattedMessage | ||
'jsx-a11y/label-has-for': 'off', // deprecated in 6.1.0, does not support select tags | ||
'jsx-a11y/control-has-associated-label': 'off', // this has a bug with FormattedMessage | ||
|
||
// compat | ||
'compat/compat': 'warn', | ||
|
||
// prettier | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
arrowParens: 'avoid', | ||
endOfLine: 'auto', | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
}, | ||
], | ||
|
||
'no-shadow': 'off', | ||
}, | ||
env: { | ||
browser: true, | ||
jest: true, | ||
}, | ||
plugins: ['react', 'compat', 'prettier', 'jsx-a11y'], | ||
settings: { | ||
polyfills: ['fetch', 'promises'], | ||
}, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
compressionLevel: mixed | ||
|
||
enableGlobalCache: false | ||
|
||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-4.5.1.cjs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
FROM node:16-alpine3.16 | ||
FROM node:20-alpine AS builder | ||
LABEL maintainer="Digitransit <digitransit@HSL.fi>" | ||
|
||
WORKDIR /opt/digitransit-graphql | ||
|
||
COPY . ./ | ||
RUN yarn | ||
# Copy files to build container, install dependencies, and build application. | ||
COPY . . | ||
|
||
# None of these are secrets, the env parameter can be visible in public. | ||
# These are for more configurability (as opposed to having keys directly in code). | ||
ARG REACT_APP_DEV_API_SUBSCRIPTION_KEY="" | ||
ARG REACT_APP_API_SUBSCRIPTION_KEY="" | ||
ENV REACT_APP_API_SUBSCRIPTION_KEY_PARAM=digitransit-subscription-key | ||
ENV REACT_APP_DEV_API_SUBSCRIPTION_KEY=$REACT_APP_DEV_API_SUBSCRIPTION_KEY | ||
ENV REACT_APP_API_SUBSCRIPTION_KEY=$REACT_APP_API_SUBSCRIPTION_KEY | ||
|
||
RUN yarn install | ||
RUN yarn build | ||
|
||
|
||
FROM nginx:1.27.2-alpine | ||
WORKDIR /usr/share/nginx/html | ||
|
||
# Remove default nginx files, copy built files, and copy nginx configuration. | ||
RUN rm -rf ./* | ||
COPY --from=builder /opt/digitransit-graphql/build . | ||
COPY --from=builder /opt/digitransit-graphql/nginx/nginx.conf /etc/nginx/conf.d/default.conf | ||
|
||
EXPOSE 8080 | ||
ENV REACT_APP_DISABLE_LIVE_RELOAD=true | ||
ENTRYPOINT ["yarn", "start"] | ||
ENTRYPOINT ["nginx", "-g", "daemon off;"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current', | ||
browsers: [], | ||
}, | ||
}, | ||
], | ||
'@babel/preset-react', | ||
], | ||
plugins: [ | ||
'dynamic-import-node', | ||
'relay', | ||
'@babel/plugin-syntax-dynamic-import', | ||
'@babel/plugin-transform-class-properties', | ||
'@babel/plugin-transform-json-strings', | ||
], | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
server { | ||
listen 8080; | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html =404; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"short_name": "graphiql-deployment", | ||
"name": "GraphiQL deployment", | ||
"icons": [ | ||
{ | ||
"src": "favicon.png", | ||
"sizes": " 96x96 64x64 32x32 24x24 16x16", | ||
"type": "image/png" | ||
} | ||
], | ||
"start_url": ".", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# https://www.robotstxt.org/robotstxt.html | ||
User-agent: * | ||
Disallow: | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this prevent graphiql from being indexed by search engines? I'm not sure if we want to prevent it or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of these files were created when I initalized a new app with create react app in order to migrate to the new version. I removed this file now