You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure to fork this template and run yarn && yarn build && yarn start in the terminal.
Please make sure Mesh package versions under package.json matches yours.
2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Describe the bug
The rateLimit plugin is returning query data of a query configured using the rateLimit plugin when multiple queries or fragment are requested.
The result contains the error message but also the data of the query.
Mesh config file: .meshrc.yaml contents
serve:
playground: true
browser: false
sources:
- name: SWAPI
handler:
graphql:
endpoint: https://swapi-graphql.netlify.app/.netlify/functions/index
plugins:
- rateLimit:
config:
# Add as many rules as you want
- type: Root
field: allFilms
max: 5 # requests limit for a time period
ttl: 30000 # time period
identifier: '{context.req.socket.remoteAddress}'
fragment Film on Film {
id
title
}
query swapi {
film(id: "ZmlsbXM6MQ==") {
...Film
}
allFilms(first: 3) {
films {
id
title
}
}
}
To Reproduce Steps to reproduce the behavior:
Expected behavior
Environment:
OS:
@graphql-mesh/...:
NodeJS:
Additional context
ERRORING WHEN:
Two queries using fragment
Two queries without fragment
Two queries and one is commented using fragment
ERROR: One Query using fragment
SUCCESS:
Two queries and one is commented no fragments
One query no fragments
The text was updated successfully, but these errors were encountered:
jmolivas
changed the title
rateLimit plugin returning data when multiple queries or fragment are requested
The rateLimit plugin is returning data when multiple queries or fragment are requested
Mar 19, 2023
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Github
Cloudflare Deployment
Describe the bug
The
rateLimit
plugin is returning query data of a query configured using the rateLimit plugin when multiple queries or fragment are requested.The result contains the error message but also the data of the query.
Mesh config file:
.meshrc.yaml
contentsDependencies at
package.json
fileQueries and fragment
To Reproduce Steps to reproduce the behavior:
Expected behavior
Environment:
@graphql-mesh/...
:Additional context
ERRORING WHEN:
Two queries using fragment
Two queries without fragment
Two queries and one is commented using fragment
ERROR: One Query using fragment
SUCCESS:
Two queries and one is commented no fragments
One query no fragments
The text was updated successfully, but these errors were encountered: