{"action":"created","issue":{"url":"https://api.github.com/repos/graphql-python/graphene/issues/772","repository_url":"https://api.github.com/repos/graphql-python/graphene","labels_url":"https://api.github.com/repos/graphql-python/graphene/issues/772/labels{/name}","comments_url":"https://api.github.com/repos/graphql-python/graphene/issues/772/comments","events_url":"https://api.github.com/repos/graphql-python/graphene/issues/772/events","html_url":"https://github.com/graphql-python/graphene/issues/772","id":333265945,"node_id":"MDU6SXNzdWUzMzMyNjU5NDU=","number":772,"title":"Offer a way to calculate and limit the total cost of a query","user":{"login":"patrys","id":81205,"node_id":"MDQ6VXNlcjgxMjA1","avatar_url":"https://avatars1.githubusercontent.com/u/81205?v=4","gravatar_id":"","url":"https://api.github.com/users/patrys","html_url":"https://github.com/patrys","followers_url":"https://api.github.com/users/patrys/followers","following_url":"https://api.github.com/users/patrys/following{/other_user}","gists_url":"https://api.github.com/users/patrys/gists{/gist_id}","starred_url":"https://api.github.com/users/patrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrys/subscriptions","organizations_url":"https://api.github.com/users/patrys/orgs","repos_url":"https://api.github.com/users/patrys/repos","events_url":"https://api.github.com/users/patrys/events{/privacy}","received_events_url":"https://api.github.com/users/patrys/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-18T13:18:20Z","updated_at":"2018-09-13T05:31:12Z","closed_at":null,"author_association":"NONE","body":"When offering a public API there's the problem of malicious clients preparing intentionally expensive queries. For example one could abuse mutually related objects to arbitrarily make a query more expensive: `book` -> `author` -> `books` -> `author` -> `books` -> ...and so on.\r\n\r\nI'd like to request a method to evaluate the estimated cost of query before actually executing any resolvers and a way to prevent execution of queries with the estimate cost above a certain threshold (ideally in a programmatic fashion so we could for example vary the limits depending on the currently logged in user's role)."},"comment":{"url":"https://api.github.com/repos/graphql-python/graphene/issues/comments/420888404","html_url":"https://github.com/graphql-python/graphene/issues/772#issuecomment-420888404","issue_url":"https://api.github.com/repos/graphql-python/graphene/issues/772","id":420888404,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDg4ODQwNA==","user":{"login":"Falieson","id":1538572,"node_id":"MDQ6VXNlcjE1Mzg1NzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1538572?v=4","gravatar_id":"","url":"https://api.github.com/users/Falieson","html_url":"https://github.com/Falieson","followers_url":"https://api.github.com/users/Falieson/followers","following_url":"https://api.github.com/users/Falieson/following{/other_user}","gists_url":"https://api.github.com/users/Falieson/gists{/gist_id}","starred_url":"https://api.github.com/users/Falieson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Falieson/subscriptions","organizations_url":"https://api.github.com/users/Falieson/orgs","repos_url":"https://api.github.com/users/Falieson/repos","events_url":"https://api.github.com/users/Falieson/events{/privacy}","received_events_url":"https://api.github.com/users/Falieson/received_events","type":"User","site_admin":false},"created_at":"2018-09-13T05:31:12Z","updated_at":"2018-09-13T05:31:12Z","author_association":"NONE","body":"Here's some more about the topic from the JS world:\r\nhttps://blog.apollographql.com/securing-your-graphql-api-from-malicious-queries-16130a324a6b\r\nhttps://github.com/pa-bru/graphql-cost-analysis\r\n"}}
{"actor":{"display_login":"Falieson"}}