MCPcopy Create free account
hub / github.com/openai/plugins / getFieldDef

Function getFieldDef

plugins/shopify/skills/shopify-admin/scripts/validate.mjs:7236–7250  ·  view source on GitHub ↗
(schema, parentType, fieldNode)

Source from the content-addressed store, hash-verified

7234 };
7235 exports.TypeInfo = TypeInfo;
7236 function getFieldDef(schema, parentType, fieldNode) {
7237 const name = fieldNode.name.value;
7238 if (name === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) {
7239 return _introspection.SchemaMetaFieldDef;
7240 }
7241 if (name === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) {
7242 return _introspection.TypeMetaFieldDef;
7243 }
7244 if (name === _introspection.TypeNameMetaFieldDef.name && (0, _definition.isCompositeType)(parentType)) {
7245 return _introspection.TypeNameMetaFieldDef;
7246 }
7247 if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) {
7248 return parentType.getFields()[name];
7249 }
7250 }
7251 function visitWithTypeInfo(typeInfo, visitor) {
7252 return {
7253 enter(...args) {

Callers 1

executeFieldFunction · 0.70

Calls 2

getQueryTypeMethod · 0.45
getFieldsMethod · 0.45

Tested by

no test coverage detected