UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 379 B
import{isObjectType as S,isInterfaceType as m,isUnionType as n}from"graphql";import{getScalarSelectionSetExample as s}from"./scalar-example.js";import{getObjectSelectionSetExample as T}from"./object-example.js";const b=(e,r,o,t,c,i,f)=>{if(S(e)||m(e))return T(e,r,o,t,c,i,f);if(n(e)){const[p]=e.getTypes();return b(p,r,o,t,c,i,f)}return s()};export{b as getSelectionSetExample};