gqlifyDecodeRoot<T> function

T gqlifyDecodeRoot<T>(
  1. T decode()
)

Runs decode on a response root, converting failures to GqlifyDecodingException with the full response path.

Implementation

T gqlifyDecodeRoot<T>(T Function() decode) {
  try {
    return decode();
  } on GqlifyDecodeError catch (e) {
    throw GqlifyDecodingException(e.message, cause: e);
  }
}