Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

<!--**Issue Labels**

While not necessary, you can help organize our issues by labeling this issue when you open it. To add a label automatically, simply [x] mark the appropriate box below:

- [ ] has-reproduction
- [ ] feature
- [ ] blocking
- [ ] good first issue

To add a label not listed above, simply place `/label another-label-name` on a line by itself.
-->
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

<!--**Pull Request Labels**

While not necessary, you can help organize our pull requests by labeling this issue when you open it. To add a label automatically, simply [x] mark the appropriate box below:

- [ ] has-reproduction
- [ ] feature
- [ ] blocking
- [ ] good first review

To add a label not listed above, simply place `/label another-label-name` on a line by itself.
-->
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
# At the time of writing, the error-template is the only example repo that uses Dependabot. I'll leave
# it this way for now, but TODO: We should probably set dependabot loose on the other examples we have
directory: "/apollo-client/v3/error-template"
schedule:
interval: "daily"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
node_modules
coverage
build
.DS_Store
.env
npm-debug.log

**/dist
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2021 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
27 changes: 27 additions & 0 deletions apollo-client/v3/error-template/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Apollo Client Issue Reproduction

Welcome! If you are here then you were likely referred to this repo when reporting an error to [`apollographql/apollo-client`][1]. The core team is invested in making the best client for GraphQL possible, so when you hit an error it is important to the team that the error is resolved as soon as possible.

Unfortunately, describing an error in GitHub is often not enough to truly understand the reported issue. By creating a small reproduction test case using this template repo the Apollo Client team will be able to identify and fix your error much faster then they could without.

This repo was created with [`create-react-app`][2] for a great developer experience. If you are not using React then a small reproduction case with your framework of choice would go a long way.

To make changes in the GraphQL schema make sure to look at the `./src/index.jsx` file where we define a GraphQL schema using [GraphQL.js][3] which will run in the browser.

[1]: https://github.com/apollographql/apollo-client
[2]: https://github.com/facebookincubator/create-react-app
[3]: http://graphql.org/graphql-js/

# Reproduction Creation Steps

1. Fork this repository to your GitHub account.
2. By default, cloning this repostiory gives you an Apollo Client 3.0-based application. If you would like to start with a legacy Apollo Client 2.6 application, clone or checkout the `ac2` branch:
```sh
git clone --branch ac2 [email protected]:apollographql/react-apollo-error-template.git
# Or, after cloning the repository:
git checkout -t origin/ac2
```
2. After cloning, install all dependencies with `npm install`.
3. Start the development server with `npm start`.
4. Make the changes that will reproduce this error locally.
5. When ready, push your changes back to GitHub and let the `apollo-client` team know where they can be found.
19 changes: 19 additions & 0 deletions apollo-client/v3/error-template/config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const {
override,
addWebpackPlugin,
} = require("customize-cra");
const webpack = require("webpack");
const StatsPlugin = require("stats-webpack-plugin");

module.exports = override(
addWebpackPlugin(
new webpack.DefinePlugin({
__DEV__: process.env.NODE_ENV !== "production",
}),
),
addWebpackPlugin(
new StatsPlugin("stats.json", {
chunkModules: true,
}),
),
);
Loading