NAME

DBIO::GraphQL::Limits - Check a GraphQL document for cycles, depth and cost before it runs

VERSION

version 0.900007

METHODS

check

DBIO::GraphQL::Limits->check(
  ast       => $ast,         # GraphQL::Language::Parser::parse result
  schema    => $graphql_schema,
  policy    => $policy,      # DBIO::GraphQL::Policy: max_depth, max_cost, default_rows
  variables => \%variables,
  operation => $name,        # optional operation name
);

Dies with a message naming the violated rule (fragment cycle, max_depth or max_cost). Returns nothing when the document passes.

AUTHOR

DBIO Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.