Skip to content

Commit 39c83fa

Browse files
committed
first commit
0 parents  commit 39c83fa

18 files changed

+8122
-0
lines changed

.circleci/config.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 2.1
2+
orbs:
3+
node: circleci/[email protected]
4+
jobs:
5+
build-test-release:
6+
executor:
7+
name: node/default
8+
steps:
9+
- checkout
10+
- node/install-packages:
11+
pkg-manager: yarn
12+
- run: yarn run build
13+
- run: yarn add --dev jest-junit
14+
- run:
15+
command: yarn test -- --ci --runInBand --collectCoverage --reporters=default --reporters=jest-junit
16+
environment:
17+
JEST_JUNIT_OUTPUT_DIR: "reports/junit/js-test-results.xml"
18+
- store_test_results:
19+
path: reports/junit
20+
- run:
21+
name: Upload Coverage Results
22+
command: |
23+
curl -s https://codecov.io/bash | bash -s -- \
24+
-f "coverage/coverage-final.json" \
25+
-t "${CODECOV_TOKEN}" \
26+
-n "${CIRCLE_BUILD_NUM}" \
27+
-y ".codecov.yml" \
28+
-Z || echo 'Codecov upload failed'
29+
- run: yarn run semantic-release || echo 'failed semantic-release...'
30+
workflows:
31+
pipeline:
32+
jobs:
33+
- build-test-release

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#root = true
2+
3+
[*]
4+
indent_style = space
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
max_line_length = 100
10+
indent_size = 2
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules
2+
coverage
3+
.nyc_output
4+
.DS_Store
5+
*.log
6+
.vscode
7+
.idea
8+
dist
9+
compiled
10+
.awcache
11+
.rpt2_cache

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.org

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG
2+
3+
The changelog is automatically updated using
4+
[semantic-release](https://github.com/semantic-release/semantic-release). You
5+
can see it on the [releases page](../../releases).

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Joel Marcotte
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
2+
<!-- PROJECT SHIELDS -->
3+
<!--
4+
*** I'm using markdown "reference style" links for readability.
5+
*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
6+
*** See the bottom of this document for the declaration of the reference variables
7+
*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
8+
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
9+
-->
10+
[![CircleCI][circleci-shield]][circleci-url]
11+
[![CodeCov][codecov-shield]][codecov-url]
12+
[![Contributors][contributors-shield]][contributors-url]
13+
[![Forks][forks-shield]][forks-url]
14+
[![Stargazers][stars-shield]][stars-url]
15+
[![Issues][issues-shield]][issues-url]
16+
[![Version][version-shield]][version-url]
17+
[![MIT License][license-shield]][license-url]
18+
19+
20+
21+
<!-- PROJECT LOGO -->
22+
<br />
23+
<p align="center">
24+
<a href="https://github.com/SurveyMonkey/graphql-introfields">
25+
</a>
26+
27+
<h3 align="center">GraphQL Ergonomock</h3>
28+
29+
<p align="center">
30+
🔮 Developer-friendly automagical mocking for GraphQL
31+
<br />
32+
<a href="https://github.com/SurveyMonkey/graphql-introfields/issues">Report Bug</a>
33+
·
34+
<a href="https://github.com/SurveyMonkey/graphql-introfields/issues">Request Feature</a>
35+
</p>
36+
</p>
37+
38+
39+
40+
<!-- TABLE OF CONTENTS -->
41+
## Table of Contents
42+
43+
- [Table of Contents](#table-of-contents)
44+
- [About The Project](#about-the-project)
45+
- [Basic Example](#basic-example)
46+
- [Built With](#built-with)
47+
- [Getting Started](#getting-started)
48+
- [Installation](#installation)
49+
- [Usage](#usage)
50+
- [Roadmap](#roadmap)
51+
- [Contributing](#contributing)
52+
- [License](#license)
53+
- [Contact](#contact)
54+
- [Acknowledgements](#acknowledgements)
55+
56+
57+
58+
<!-- ABOUT THE PROJECT -->
59+
## About The Project
60+
61+
TBD
62+
63+
### Basic Example
64+
65+
TBD
66+
67+
### Built With
68+
* [Typescript](https://www.typescriptlang.org/)
69+
* [GraphQL](https://graphql.org)
70+
* [Jest](https://jestjs.io)
71+
72+
73+
74+
<!-- GETTING STARTED -->
75+
## Getting Started
76+
77+
### Installation
78+
79+
TBD
80+
81+
<!-- USAGE EXAMPLES -->
82+
### Usage
83+
84+
TBD
85+
86+
<!-- ROADMAP -->
87+
## Roadmap
88+
89+
See the [open issues](https://github.com/SurveyMonkey/graphql-introfields/issues) for a list of proposed features (and known issues).
90+
91+
92+
<!-- CONTRIBUTING -->
93+
## Contributing
94+
95+
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
96+
97+
1. Fork the Project
98+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
99+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
100+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
101+
5. Open a Pull Request
102+
103+
104+
105+
<!-- LICENSE -->
106+
## License
107+
108+
Distributed under the MIT License. See `LICENSE` for more information.
109+
110+
111+
<!-- CONTACT -->
112+
## Contact
113+
114+
Maintainer: Joel Marcotte (Github [@joual](https://github.com/joual))
115+
116+
Project Link: [https://github.com/SurveyMonkey/graphql-introfields](https://github.com/SurveyMonkey/graphql-introfields)
117+
118+
119+
<!-- ACKNOWLEDGEMENTS -->
120+
## Acknowledgements
121+
122+
* [A new approach to mocking GraphQL Data](https://www.freecodecamp.org/news/a-new-approach-to-mocking-graphql-data-1ef49de3d491/)
123+
* [GraphQL-Tools](https://github.com/apollographql/graphql-tools)
124+
* [GraphQL-JS](https://github.com/graphql/graphql-js)
125+
126+
127+
<!-- MARKDOWN LINKS & IMAGES -->
128+
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
129+
[contributors-shield]: https://img.shields.io/github/contributors/SurveyMonkey/graphql-introfields.svg?style=flat-square
130+
[contributors-url]: https://github.com/SurveyMonkey/graphql-introfields/graphs/contributors
131+
[forks-shield]: https://img.shields.io/github/forks/SurveyMonkey/graphql-introfields.svg?style=flat-square
132+
[forks-url]: https://github.com/SurveyMonkey/graphql-introfields/network/members
133+
[stars-shield]: https://img.shields.io/github/stars/SurveyMonkey/graphql-introfields.svg?style=flat-square
134+
[stars-url]: https://github.com/SurveyMonkey/graphql-introfields/stargazers
135+
[version-url]:https://www.npmjs.com/package/graphql-introfields
136+
[version-shield]:https://img.shields.io/npm/v/graphql-introfields.svg?style=flat-square
137+
[issues-shield]: https://img.shields.io/github/issues/SurveyMonkey/graphql-introfields.svg?style=flat-square
138+
[issues-url]: https://github.com/SurveyMonkey/graphql-introfields/issues
139+
[license-shield]: https://img.shields.io/github/license/SurveyMonkey/graphql-introfields.svg?style=flat-square
140+
[license-url]: https://github.com/SurveyMonkey/graphql-introfields/blob/master/LICENSE.txt
141+
[circleci-shield]: https://circleci.com/gh/SurveyMonkey/graphql-introfields.svg?style=shield
142+
[circleci-url]: https://app.circleci.com/pipelines/github/SurveyMonkey/graphql-introfields
143+
[codecov-shield]: https://codecov.io/gh/SurveyMonkey/graphql-introfields/branch/master/graph/badge.svg
144+
[codecov-url]: https://codecov.io/gh/SurveyMonkey/graphql-introfields

jest.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
roots: ["<rootDir>/src"],
3+
testMatch: ["__tests__/**/*.+(ts|tsx|js)", "**/?(*.)+(spec|test).+(ts|tsx|js)"],
4+
transform: {
5+
"^.+\\.(ts|tsx)$": "ts-jest"
6+
},
7+
setupFilesAfterEnv: ["jest-extended"],
8+
globals: {
9+
"ts-jest": {
10+
diagnostics: false
11+
}
12+
}
13+
};

package.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "graphql-introfields",
3+
"version": "0.0.0-development",
4+
"description": "Apollo-server resolver utilities based on fields introspection",
5+
"main": "dist/index.js",
6+
"author": "Joel Marcotte",
7+
"license": "MIT",
8+
"keywords": [
9+
"apollo-server",
10+
"apollo",
11+
"graphql",
12+
"resolvers",
13+
"typescript"
14+
],
15+
"scripts": {
16+
"test": "jest --coverage",
17+
"build": "rimraf ./dist && tsc",
18+
"prepublishOnly": "npm run build",
19+
"semantic-release": "semantic-release"
20+
},
21+
"files": [
22+
"dist"
23+
],
24+
"devDependencies": {
25+
"@graphql-tools/schema": "^6.0.12",
26+
"@types/jest": "^26.0.4",
27+
"jest": "26.0.1",
28+
"jest-extended": "0.11.5",
29+
"prettier": "2.0.5",
30+
"semantic-release": "17.0.8",
31+
"ts-jest": "26.1.0",
32+
"typescript": "3.9.3"
33+
},
34+
"renovate": {
35+
"extends": [
36+
"config:js-lib"
37+
]
38+
},
39+
"repository": {
40+
"type": "git",
41+
"url": "https://github.com/SurveyMonkey/graphql-introfields.git"
42+
},
43+
"dependencies": {
44+
"graphql": "^15.0.0"
45+
}
46+
}

0 commit comments

Comments
 (0)