UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 996 B
var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var g=(e,n)=>{for(var a in n)i(e,a,{get:n[a],enumerable:!0})},x=(e,n,a,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of u(n))!v.call(e,o)&&o!==a&&i(e,o,{get:()=>n[o],enumerable:!(r=s(n,o))||r.enumerable});return e};var c=e=>x(i({},"__esModule",{value:!0}),e);var E={};g(E,{useIsFieldExpandable:()=>d,useShowExpandableBorder:()=>m});module.exports=c(E);var t=require("graphql"),l=require("../../settings");function d(e,n){var a;const r=(0,l.useSettings)().fieldExpandLevel;return(!!(!((a=e.args)===null||a===void 0)&&a.length)||!(0,t.isScalarType)((0,t.getNamedType)(e.type)))&&n<r}function m(e,n,{expandedTypes:a,expandedArguments:r}){var o;const p=d(e,n);return!p||p&&!a||p&&!!(!((o=e.args)===null||o===void 0)&&o.length)&&!r&&(0,t.isScalarType)((0,t.getNamedType)(e.type))}0&&(module.exports={useIsFieldExpandable,useShowExpandableBorder});