benzene73
Token_limit doesn't work in absinthe
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?
First Post!
maartenvanvliet
Which version of absinthe_plug are you using? With token_limit is only available on github iirc
Popular in Questions
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this:
...
New
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this
"1000"
What is the ...
New
Hey,
I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
Other popular topics
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Hello, I have map which I want to convert it to string like this:
the map:
%{last_name: "tavakkoli", name: "shahryar"}
the string I ne...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New







