UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 567 B
import{jsx as t,jsxs as m}from"react/jsx-runtime";import{memo as p,useMemo as n}from"react";import{Box as s}from"../../common/index.js";import{useStore as a}from"../../app/index.js";import{OperationExample as d}from"../../examples/index.js";import{ExtendedFieldView as f}from"../components/index.js";function u({name:o,path:i}){const r=a(),e=n(()=>r?.getQueryField(o),[o,r]);return e?m(s,{"data-testid":e.name,direction:"row",wrap:"wrap",gap:"64px",children:[t(f,{field:e,path:i}),t(d,{operationType:"query",operation:e})]}):null}const Q=p(u);export{Q as QueryItem};