PageSourceSearch

https://graphql-java.com/assets/js/bdb75123.57ae6a64.js

js graphql-java.com collected 2026-10-02 07:25:26 UTC 5,143 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkwebsite=globalThis.webpackChunkwebsite||[]).push([[2767],{1948(e,n,i){i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>d,frontMatter:()=>s,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"exceptions","title":"Exceptions","description":"Outlines the exceptions used in graphql-java","source":"@site/documentation/exceptions.md","sourceDirName":".","slug":"/exceptions","permalink":"/documentation/master/exceptions","draft":false,"unlisted":false,"editUrl":"https://github.com/graphql-java/graphql-java-page/edit/master/documentation/exceptions.md","tags":[],"version":"current","frontMatter":{"title":"Exceptions","date":"2018-09-09T02:52:46.000Z","description":"Outlines the exceptions used in graphql-java"},"sidebar":"tutorialSidebar","previous":{"title":"SDL directives","permalink":"/documentation/master/directives"},"next":{"title":"Execution","permalink":"/documentation/master/execution"}}');var r=i(4848),a=i(8453);const s={title:"Exceptions",date:new Date("2018-09-09T02:52:46.000Z"),description:"Outlines the exceptions used in graphql-java"},c="Runtime Exceptions",o={},l=[];function h(e){const n={code:"code",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"runtime-exceptions",children:"Runtime Exceptions"})}),"\n",(0,r.jsxs)(n.p,{children:["Runtime exceptions can be thrown by the graphql engine if certain exceptional situations are encountered.  The following\nare a list of the exceptions that can be thrown all the way out of a ",(0,r.jsx)(n.code,{children:"graphql.execute(...)"})," call."]}),"\n",(0,r.jsx)(n.p,{children:"These are not graphql errors in execution but rather totally unacceptable conditions in which to execute a graphql query."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"graphql.schema.CoercingSerializeException"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"is thrown when a value cannot be serialised by a Scalar type, for example\na String value being coerced as an Int."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"graphql.schema.CoercingParseValueException"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"is thrown when a value cannot be parsed by a Scalar type, for example\na String input value being parsed as an Int."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"graphql.execution.UnresolvedTypeException"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["is thrown if a ",(0,r.jsx)(n.code,{children:"graphql.schema.TypeResolver"})," fails to provide a concrete\nobject type given a interface or union type."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"graphql.execution.NonNullableValueCoercedAsNullException"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"is thrown if a non null variable argument is coerced as a\nnull value during execution."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"graphql.execution.InputMapDefinesTooManyFieldsException"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"is thrown if a map used for an input type object contains\nmore keys than is defined in that input type."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"graphql.schema.validation.InvalidSchemaException"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["is thrown if the schema is not valid when built via\n",(0,r.jsx)(n.code,{children:"graphql.schema.GraphQLSchema.Builder#build()"})]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"graphql.execution.UnknownOperationException"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"if multiple operations are defined in the query and\nthe operation name is missing or there is no matching operation name\ncontained in the GraphQL query."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"graphql.GraphQLException"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"is thrown as a general purpose runtime exception, for example if the code cant\naccess a named field when examining a POJO, it is analogous to a RuntimeException if you will."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"graphql.AssertException"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"is thrown as a low level code assertion exception for truly unexpected code conditions, things we assert\nshould never happen in practice."})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453(e,n,i){i.d(n,{R:()=>s,x:()=>c});var t=i(6540);const r={},a=t.createContext(r);function s(e){const n=t.useContext(a);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.