UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 451 B
function a(e,t){return u(e.name,t.types,t.items)}function i(e,t,c){const n=c[t];return u(e.name,n,c.items)}function d(e,t){return u(e.name,t.directives,t.items)}function u(e,t,c){const n=s(e,t.includeByName)||s(e,c.includeByName),r=s(e,t.excludeByName)||s(e,c.excludeByName);return n&&!r}function s(e,t){const c=t.names.has(e),n=t.regexps.some(r=>r.test(e));return c||n}export{d as directiveMatchesGroup,i as fieldMatchesGroup,a as typeMatchesGroup};