Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f177595

Browse files
Merge pull request #100 from oslabs-beta/em/deploy-update
Deployment Update
2 parents 6b1662b + 31aee59 commit f177595

File tree

15 files changed

+9340
-4670
lines changed

15 files changed

+9340
-4670
lines changed

‎.eslintignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
dist

‎.eslintrc.json‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,22 @@
1717
"ecmaVersion": "latest",
1818
"project": "./tsconfig.json"
1919
},
20-
"plugins": ["import", "prettier"],
20+
"plugins": [
21+
"import", "prettier"
22+
],
2123
"rules": {
22-
"no-plusplus": [2, {
23-
"allowForLoopAfterthoughts": true
24-
}],
24+
"no-plusplus": [
25+
2,
26+
{
27+
"allowForLoopAfterthoughts": true
28+
}
29+
],
2530
"prettier/prettier": [
2631
"error"
2732
]
28-
},
29-
"ignorePatterns": ["jest.*", "build/*"]
30-
}
33+
},
34+
"ignorePatterns": [
35+
"jest.*",
36+
"dist/*"
37+
]
38+
}

‎.npmignore‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
**/*
2+
dist/src/utils/__mock__
3+
dist/test/*
4+
!dist/src/analysis/*
5+
!dist/src/middleware/*
6+
!dist/src/rateLimiters/*
7+
!dist/src/utils/*
8+
!dist/src/*
9+
!package.json

‎.travis.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ node_js:
88
branches:
99
only:
1010
- dev
11-
- main
11+
#- main
1212
# scripts to run for each test
1313
script:
1414
- echo "Running tests against $(node -v) ..."
@@ -19,8 +19,8 @@ script:
1919
deploy:
2020
on:
2121
branch: main
22-
tags: true
23-
skip_cleanup: false
22+
tags: false
23+
skip_cleanup: true
2424
provider: npm
2525
email: $NPM_EMAIL_ADDRESS
2626
api_key: $NPM_API_KEY

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ NOTE: a Redis server instance will need to be started in order for the limiter t
3535

3636
```javascript
3737
// import package
38-
import expressGraphQLRateLimiter from 'graphql-limiter';
38+
import { expressGraphQLRateLimiter } from 'graphql-limiter';
3939

4040
/**
4141
* Import other dependencies
@@ -135,7 +135,7 @@ type Query {
135135

136136
Requests are rate-limited based on the IP address associated with the request.
137137

138-
On startup, the GraphQL (GQL) schema is parsed to build an object that maps GQL types/fields to their corresponding weights. Type weights can be provided during <a href="typeWeights">initial configuration</a>. When a request is received, this object is used to cross reference the fields queried by the user and compute the complexity of each field. The total complexity of the request is the sum of these values.
138+
On startup, the GraphQL (GQL) schema is parsed to build an object that maps GQL types/fields to their corresponding weights. Type weights can be provided during <a href="#typeWeights">initial configuration</a>. When a request is received, this object is used to cross reference the fields queried by the user and compute the complexity of each field. The total complexity of the request is the sum of these values.
139139

140140
Complexity is determined, statically (before any resolvers are called) to estimate the upper bound of the response size - a proxy for the work done by the server to build the response. The total complexity is then used to allow/block the request based on popular rate-limiting algorithms.
141141

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /