UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 348 B
import{isConnectionField as m}from"../../schema/helpers/is-connection-field.js";function p(e,n,t,r){if(t===n)return{__typename:e.name};const o=Object.values(e.getFields()).map(c=>a(c,n,t,r));return Object.fromEntries(o)}function a(e,n,t,r){const o=m(e)?t:t+1,c=r({type:e.type,expandLevel:n,level:o});return[e.name,c]}export{p as getObjectExample};