scope "/" do
pipe_through([:api])
forward("/graphql", Absinthe.Plug,
schema: AppWeb.GraphQL.Schema,
analyze_complexity: true,
max_complexity: 1000,
token_limit: 2
)
It still outputs though it is supposed to error
{
"data": {
"book": {
"myShelves": [],
"originalPublicationDate": "2014-09-16",
"positionInSeries": null,
"ratingsCount": {
"8": 1
},
"reviewsCount": 0,
"seriesId": null,
"slug": "zero-to-one-notes-on-startups-or-how-to-build",
"title": "Zero to One: Notes on Startups, or How to Build the Future",
"totalRatingsCount": 1
}
}
}
though reducing the max_complexity to 2, errors as expected
{
"errors": [
{
"message": "Field myShelves is too complex: complexity is 6 and maximum is 2",
"locations": [
{
"line": 11,
"column": 9
}
]
},
{
"message": "Field book is too complex: complexity is 15 and maximum is 2",
"locations": [
{
"line": 2,
"column": 5
}
]
},
{
"message": "Operation Book is too complex: complexity is 15 and maximum is 2",
"locations": [
{
"line": 1,
"column": 1
}
]
}
]
}
is token_limit not supported anymore in absinthe?