Best Keploy code snippet using generated.___Directive_isRepeatable
generated.go
Source:generated.go
...906 res := resTmp.([]introspection.InputValue)907 fc.Result = res908 return ec.marshalN__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)909}910func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {911 defer func() {912 if r := recover(); r != nil {913 ec.Error(ctx, ec.Recover(ctx, r))914 ret = graphql.Null915 }916 }()917 fc := &graphql.FieldContext{918 Object: "__Directive",919 Field: field,920 Args: nil,921 IsMethod: false,922 IsResolver: false,923 }924 ctx = graphql.WithFieldContext(ctx, fc)925 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {926 ctx = rctx // use context from middleware stack in children927 return obj.IsRepeatable, nil928 })929 if err != nil {930 ec.Error(ctx, err)931 return graphql.Null932 }933 if resTmp == nil {934 if !graphql.HasFieldError(ctx, fc) {935 ec.Errorf(ctx, "must not be null")936 }937 return graphql.Null938 }939 res := resTmp.(bool)940 fc.Result = res941 return ec.marshalNBoolean2bool(ctx, field.Selections, res)942}943func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {944 defer func() {945 if r := recover(); r != nil {946 ec.Error(ctx, ec.Recover(ctx, r))947 ret = graphql.Null948 }949 }()950 fc := &graphql.FieldContext{951 Object: "__EnumValue",952 Field: field,953 Args: nil,954 IsMethod: false,955 IsResolver: false,956 }957 ctx = graphql.WithFieldContext(ctx, fc)958 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {959 ctx = rctx // use context from middleware stack in children960 return obj.Name, nil961 })962 if err != nil {963 ec.Error(ctx, err)964 return graphql.Null965 }966 if resTmp == nil {967 if !graphql.HasFieldError(ctx, fc) {968 ec.Errorf(ctx, "must not be null")969 }970 return graphql.Null971 }972 res := resTmp.(string)973 fc.Result = res974 return ec.marshalNString2string(ctx, field.Selections, res)975}976func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {977 defer func() {978 if r := recover(); r != nil {979 ec.Error(ctx, ec.Recover(ctx, r))980 ret = graphql.Null981 }982 }()983 fc := &graphql.FieldContext{984 Object: "__EnumValue",985 Field: field,986 Args: nil,987 IsMethod: false,988 IsResolver: false,989 }990 ctx = graphql.WithFieldContext(ctx, fc)991 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {992 ctx = rctx // use context from middleware stack in children993 return obj.Description, nil994 })995 if err != nil {996 ec.Error(ctx, err)997 return graphql.Null998 }999 if resTmp == nil {1000 return graphql.Null1001 }1002 res := resTmp.(string)1003 fc.Result = res1004 return ec.marshalOString2string(ctx, field.Selections, res)1005}1006func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {1007 defer func() {1008 if r := recover(); r != nil {1009 ec.Error(ctx, ec.Recover(ctx, r))1010 ret = graphql.Null1011 }1012 }()1013 fc := &graphql.FieldContext{1014 Object: "__EnumValue",1015 Field: field,1016 Args: nil,1017 IsMethod: true,1018 IsResolver: false,1019 }1020 ctx = graphql.WithFieldContext(ctx, fc)1021 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1022 ctx = rctx // use context from middleware stack in children1023 return obj.IsDeprecated(), nil1024 })1025 if err != nil {1026 ec.Error(ctx, err)1027 return graphql.Null1028 }1029 if resTmp == nil {1030 if !graphql.HasFieldError(ctx, fc) {1031 ec.Errorf(ctx, "must not be null")1032 }1033 return graphql.Null1034 }1035 res := resTmp.(bool)1036 fc.Result = res1037 return ec.marshalNBoolean2bool(ctx, field.Selections, res)1038}1039func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {1040 defer func() {1041 if r := recover(); r != nil {1042 ec.Error(ctx, ec.Recover(ctx, r))1043 ret = graphql.Null1044 }1045 }()1046 fc := &graphql.FieldContext{1047 Object: "__EnumValue",1048 Field: field,1049 Args: nil,1050 IsMethod: true,1051 IsResolver: false,1052 }1053 ctx = graphql.WithFieldContext(ctx, fc)1054 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1055 ctx = rctx // use context from middleware stack in children1056 return obj.DeprecationReason(), nil1057 })1058 if err != nil {1059 ec.Error(ctx, err)1060 return graphql.Null1061 }1062 if resTmp == nil {1063 return graphql.Null1064 }1065 res := resTmp.(*string)1066 fc.Result = res1067 return ec.marshalOString2ástring(ctx, field.Selections, res)1068}1069func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1070 defer func() {1071 if r := recover(); r != nil {1072 ec.Error(ctx, ec.Recover(ctx, r))1073 ret = graphql.Null1074 }1075 }()1076 fc := &graphql.FieldContext{1077 Object: "__Field",1078 Field: field,1079 Args: nil,1080 IsMethod: false,1081 IsResolver: false,1082 }1083 ctx = graphql.WithFieldContext(ctx, fc)1084 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1085 ctx = rctx // use context from middleware stack in children1086 return obj.Name, nil1087 })1088 if err != nil {1089 ec.Error(ctx, err)1090 return graphql.Null1091 }1092 if resTmp == nil {1093 if !graphql.HasFieldError(ctx, fc) {1094 ec.Errorf(ctx, "must not be null")1095 }1096 return graphql.Null1097 }1098 res := resTmp.(string)1099 fc.Result = res1100 return ec.marshalNString2string(ctx, field.Selections, res)1101}1102func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1103 defer func() {1104 if r := recover(); r != nil {1105 ec.Error(ctx, ec.Recover(ctx, r))1106 ret = graphql.Null1107 }1108 }()1109 fc := &graphql.FieldContext{1110 Object: "__Field",1111 Field: field,1112 Args: nil,1113 IsMethod: false,1114 IsResolver: false,1115 }1116 ctx = graphql.WithFieldContext(ctx, fc)1117 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1118 ctx = rctx // use context from middleware stack in children1119 return obj.Description, nil1120 })1121 if err != nil {1122 ec.Error(ctx, err)1123 return graphql.Null1124 }1125 if resTmp == nil {1126 return graphql.Null1127 }1128 res := resTmp.(string)1129 fc.Result = res1130 return ec.marshalOString2string(ctx, field.Selections, res)1131}1132func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1133 defer func() {1134 if r := recover(); r != nil {1135 ec.Error(ctx, ec.Recover(ctx, r))1136 ret = graphql.Null1137 }1138 }()1139 fc := &graphql.FieldContext{1140 Object: "__Field",1141 Field: field,1142 Args: nil,1143 IsMethod: false,1144 IsResolver: false,1145 }1146 ctx = graphql.WithFieldContext(ctx, fc)1147 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1148 ctx = rctx // use context from middleware stack in children1149 return obj.Args, nil1150 })1151 if err != nil {1152 ec.Error(ctx, err)1153 return graphql.Null1154 }1155 if resTmp == nil {1156 if !graphql.HasFieldError(ctx, fc) {1157 ec.Errorf(ctx, "must not be null")1158 }1159 return graphql.Null1160 }1161 res := resTmp.([]introspection.InputValue)1162 fc.Result = res1163 return ec.marshalN__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)1164}1165func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1166 defer func() {1167 if r := recover(); r != nil {1168 ec.Error(ctx, ec.Recover(ctx, r))1169 ret = graphql.Null1170 }1171 }()1172 fc := &graphql.FieldContext{1173 Object: "__Field",1174 Field: field,1175 Args: nil,1176 IsMethod: false,1177 IsResolver: false,1178 }1179 ctx = graphql.WithFieldContext(ctx, fc)1180 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1181 ctx = rctx // use context from middleware stack in children1182 return obj.Type, nil1183 })1184 if err != nil {1185 ec.Error(ctx, err)1186 return graphql.Null1187 }1188 if resTmp == nil {1189 if !graphql.HasFieldError(ctx, fc) {1190 ec.Errorf(ctx, "must not be null")1191 }1192 return graphql.Null1193 }1194 res := resTmp.(*introspection.Type)1195 fc.Result = res1196 return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)1197}1198func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1199 defer func() {1200 if r := recover(); r != nil {1201 ec.Error(ctx, ec.Recover(ctx, r))1202 ret = graphql.Null1203 }1204 }()1205 fc := &graphql.FieldContext{1206 Object: "__Field",1207 Field: field,1208 Args: nil,1209 IsMethod: true,1210 IsResolver: false,1211 }1212 ctx = graphql.WithFieldContext(ctx, fc)1213 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1214 ctx = rctx // use context from middleware stack in children1215 return obj.IsDeprecated(), nil1216 })1217 if err != nil {1218 ec.Error(ctx, err)1219 return graphql.Null1220 }1221 if resTmp == nil {1222 if !graphql.HasFieldError(ctx, fc) {1223 ec.Errorf(ctx, "must not be null")1224 }1225 return graphql.Null1226 }1227 res := resTmp.(bool)1228 fc.Result = res1229 return ec.marshalNBoolean2bool(ctx, field.Selections, res)1230}1231func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1232 defer func() {1233 if r := recover(); r != nil {1234 ec.Error(ctx, ec.Recover(ctx, r))1235 ret = graphql.Null1236 }1237 }()1238 fc := &graphql.FieldContext{1239 Object: "__Field",1240 Field: field,1241 Args: nil,1242 IsMethod: true,1243 IsResolver: false,1244 }1245 ctx = graphql.WithFieldContext(ctx, fc)1246 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1247 ctx = rctx // use context from middleware stack in children1248 return obj.DeprecationReason(), nil1249 })1250 if err != nil {1251 ec.Error(ctx, err)1252 return graphql.Null1253 }1254 if resTmp == nil {1255 return graphql.Null1256 }1257 res := resTmp.(*string)1258 fc.Result = res1259 return ec.marshalOString2ástring(ctx, field.Selections, res)1260}1261func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {1262 defer func() {1263 if r := recover(); r != nil {1264 ec.Error(ctx, ec.Recover(ctx, r))1265 ret = graphql.Null1266 }1267 }()1268 fc := &graphql.FieldContext{1269 Object: "__InputValue",1270 Field: field,1271 Args: nil,1272 IsMethod: false,1273 IsResolver: false,1274 }1275 ctx = graphql.WithFieldContext(ctx, fc)1276 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1277 ctx = rctx // use context from middleware stack in children1278 return obj.Name, nil1279 })1280 if err != nil {1281 ec.Error(ctx, err)1282 return graphql.Null1283 }1284 if resTmp == nil {1285 if !graphql.HasFieldError(ctx, fc) {1286 ec.Errorf(ctx, "must not be null")1287 }1288 return graphql.Null1289 }1290 res := resTmp.(string)1291 fc.Result = res1292 return ec.marshalNString2string(ctx, field.Selections, res)1293}1294func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {1295 defer func() {1296 if r := recover(); r != nil {1297 ec.Error(ctx, ec.Recover(ctx, r))1298 ret = graphql.Null1299 }1300 }()1301 fc := &graphql.FieldContext{1302 Object: "__InputValue",1303 Field: field,1304 Args: nil,1305 IsMethod: false,1306 IsResolver: false,1307 }1308 ctx = graphql.WithFieldContext(ctx, fc)1309 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1310 ctx = rctx // use context from middleware stack in children1311 return obj.Description, nil1312 })1313 if err != nil {1314 ec.Error(ctx, err)1315 return graphql.Null1316 }1317 if resTmp == nil {1318 return graphql.Null1319 }1320 res := resTmp.(string)1321 fc.Result = res1322 return ec.marshalOString2string(ctx, field.Selections, res)1323}1324func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {1325 defer func() {1326 if r := recover(); r != nil {1327 ec.Error(ctx, ec.Recover(ctx, r))1328 ret = graphql.Null1329 }1330 }()1331 fc := &graphql.FieldContext{1332 Object: "__InputValue",1333 Field: field,1334 Args: nil,1335 IsMethod: false,1336 IsResolver: false,1337 }1338 ctx = graphql.WithFieldContext(ctx, fc)1339 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1340 ctx = rctx // use context from middleware stack in children1341 return obj.Type, nil1342 })1343 if err != nil {1344 ec.Error(ctx, err)1345 return graphql.Null1346 }1347 if resTmp == nil {1348 if !graphql.HasFieldError(ctx, fc) {1349 ec.Errorf(ctx, "must not be null")1350 }1351 return graphql.Null1352 }1353 res := resTmp.(*introspection.Type)1354 fc.Result = res1355 return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)1356}1357func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {1358 defer func() {1359 if r := recover(); r != nil {1360 ec.Error(ctx, ec.Recover(ctx, r))1361 ret = graphql.Null1362 }1363 }()1364 fc := &graphql.FieldContext{1365 Object: "__InputValue",1366 Field: field,1367 Args: nil,1368 IsMethod: false,1369 IsResolver: false,1370 }1371 ctx = graphql.WithFieldContext(ctx, fc)1372 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1373 ctx = rctx // use context from middleware stack in children1374 return obj.DefaultValue, nil1375 })1376 if err != nil {1377 ec.Error(ctx, err)1378 return graphql.Null1379 }1380 if resTmp == nil {1381 return graphql.Null1382 }1383 res := resTmp.(*string)1384 fc.Result = res1385 return ec.marshalOString2ástring(ctx, field.Selections, res)1386}1387func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {1388 defer func() {1389 if r := recover(); r != nil {1390 ec.Error(ctx, ec.Recover(ctx, r))1391 ret = graphql.Null1392 }1393 }()1394 fc := &graphql.FieldContext{1395 Object: "__Schema",1396 Field: field,1397 Args: nil,1398 IsMethod: true,1399 IsResolver: false,1400 }1401 ctx = graphql.WithFieldContext(ctx, fc)1402 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1403 ctx = rctx // use context from middleware stack in children1404 return obj.Types(), nil1405 })1406 if err != nil {1407 ec.Error(ctx, err)1408 return graphql.Null1409 }1410 if resTmp == nil {1411 if !graphql.HasFieldError(ctx, fc) {1412 ec.Errorf(ctx, "must not be null")1413 }1414 return graphql.Null1415 }1416 res := resTmp.([]introspection.Type)1417 fc.Result = res1418 return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)1419}1420func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {1421 defer func() {1422 if r := recover(); r != nil {1423 ec.Error(ctx, ec.Recover(ctx, r))1424 ret = graphql.Null1425 }1426 }()1427 fc := &graphql.FieldContext{1428 Object: "__Schema",1429 Field: field,1430 Args: nil,1431 IsMethod: true,1432 IsResolver: false,1433 }1434 ctx = graphql.WithFieldContext(ctx, fc)1435 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1436 ctx = rctx // use context from middleware stack in children1437 return obj.QueryType(), nil1438 })1439 if err != nil {1440 ec.Error(ctx, err)1441 return graphql.Null1442 }1443 if resTmp == nil {1444 if !graphql.HasFieldError(ctx, fc) {1445 ec.Errorf(ctx, "must not be null")1446 }1447 return graphql.Null1448 }1449 res := resTmp.(*introspection.Type)1450 fc.Result = res1451 return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)1452}1453func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {1454 defer func() {1455 if r := recover(); r != nil {1456 ec.Error(ctx, ec.Recover(ctx, r))1457 ret = graphql.Null1458 }1459 }()1460 fc := &graphql.FieldContext{1461 Object: "__Schema",1462 Field: field,1463 Args: nil,1464 IsMethod: true,1465 IsResolver: false,1466 }1467 ctx = graphql.WithFieldContext(ctx, fc)1468 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1469 ctx = rctx // use context from middleware stack in children1470 return obj.MutationType(), nil1471 })1472 if err != nil {1473 ec.Error(ctx, err)1474 return graphql.Null1475 }1476 if resTmp == nil {1477 return graphql.Null1478 }1479 res := resTmp.(*introspection.Type)1480 fc.Result = res1481 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)1482}1483func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {1484 defer func() {1485 if r := recover(); r != nil {1486 ec.Error(ctx, ec.Recover(ctx, r))1487 ret = graphql.Null1488 }1489 }()1490 fc := &graphql.FieldContext{1491 Object: "__Schema",1492 Field: field,1493 Args: nil,1494 IsMethod: true,1495 IsResolver: false,1496 }1497 ctx = graphql.WithFieldContext(ctx, fc)1498 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1499 ctx = rctx // use context from middleware stack in children1500 return obj.SubscriptionType(), nil1501 })1502 if err != nil {1503 ec.Error(ctx, err)1504 return graphql.Null1505 }1506 if resTmp == nil {1507 return graphql.Null1508 }1509 res := resTmp.(*introspection.Type)1510 fc.Result = res1511 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)1512}1513func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {1514 defer func() {1515 if r := recover(); r != nil {1516 ec.Error(ctx, ec.Recover(ctx, r))1517 ret = graphql.Null1518 }1519 }()1520 fc := &graphql.FieldContext{1521 Object: "__Schema",1522 Field: field,1523 Args: nil,1524 IsMethod: true,1525 IsResolver: false,1526 }1527 ctx = graphql.WithFieldContext(ctx, fc)1528 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1529 ctx = rctx // use context from middleware stack in children1530 return obj.Directives(), nil1531 })1532 if err != nil {1533 ec.Error(ctx, err)1534 return graphql.Null1535 }1536 if resTmp == nil {1537 if !graphql.HasFieldError(ctx, fc) {1538 ec.Errorf(ctx, "must not be null")1539 }1540 return graphql.Null1541 }1542 res := resTmp.([]introspection.Directive)1543 fc.Result = res1544 return ec.marshalN__Directive2ágithubácomá99designságqlgenágraphqláintrospectionáDirectiveá(ctx, field.Selections, res)1545}1546func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {1547 defer func() {1548 if r := recover(); r != nil {1549 ec.Error(ctx, ec.Recover(ctx, r))1550 ret = graphql.Null1551 }1552 }()1553 fc := &graphql.FieldContext{1554 Object: "__Type",1555 Field: field,1556 Args: nil,1557 IsMethod: true,1558 IsResolver: false,1559 }1560 ctx = graphql.WithFieldContext(ctx, fc)1561 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1562 ctx = rctx // use context from middleware stack in children1563 return obj.Kind(), nil1564 })1565 if err != nil {1566 ec.Error(ctx, err)1567 return graphql.Null1568 }1569 if resTmp == nil {1570 if !graphql.HasFieldError(ctx, fc) {1571 ec.Errorf(ctx, "must not be null")1572 }1573 return graphql.Null1574 }1575 res := resTmp.(string)1576 fc.Result = res1577 return ec.marshalN__TypeKind2string(ctx, field.Selections, res)1578}1579func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {1580 defer func() {1581 if r := recover(); r != nil {1582 ec.Error(ctx, ec.Recover(ctx, r))1583 ret = graphql.Null1584 }1585 }()1586 fc := &graphql.FieldContext{1587 Object: "__Type",1588 Field: field,1589 Args: nil,1590 IsMethod: true,1591 IsResolver: false,1592 }1593 ctx = graphql.WithFieldContext(ctx, fc)1594 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1595 ctx = rctx // use context from middleware stack in children1596 return obj.Name(), nil1597 })1598 if err != nil {1599 ec.Error(ctx, err)1600 return graphql.Null1601 }1602 if resTmp == nil {1603 return graphql.Null1604 }1605 res := resTmp.(*string)1606 fc.Result = res1607 return ec.marshalOString2ástring(ctx, field.Selections, res)1608}1609func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {1610 defer func() {1611 if r := recover(); r != nil {1612 ec.Error(ctx, ec.Recover(ctx, r))1613 ret = graphql.Null1614 }1615 }()1616 fc := &graphql.FieldContext{1617 Object: "__Type",1618 Field: field,1619 Args: nil,1620 IsMethod: true,1621 IsResolver: false,1622 }1623 ctx = graphql.WithFieldContext(ctx, fc)1624 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1625 ctx = rctx // use context from middleware stack in children1626 return obj.Description(), nil1627 })1628 if err != nil {1629 ec.Error(ctx, err)1630 return graphql.Null1631 }1632 if resTmp == nil {1633 return graphql.Null1634 }1635 res := resTmp.(string)1636 fc.Result = res1637 return ec.marshalOString2string(ctx, field.Selections, res)1638}1639func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {1640 defer func() {1641 if r := recover(); r != nil {1642 ec.Error(ctx, ec.Recover(ctx, r))1643 ret = graphql.Null1644 }1645 }()1646 fc := &graphql.FieldContext{1647 Object: "__Type",1648 Field: field,1649 Args: nil,1650 IsMethod: true,1651 IsResolver: false,1652 }1653 ctx = graphql.WithFieldContext(ctx, fc)1654 rawArgs := field.ArgumentMap(ec.Variables)1655 args, err := ec.field___Type_fields_args(ctx, rawArgs)1656 if err != nil {1657 ec.Error(ctx, err)1658 return graphql.Null1659 }1660 fc.Args = args1661 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1662 ctx = rctx // use context from middleware stack in children1663 return obj.Fields(args["includeDeprecated"].(bool)), nil1664 })1665 if err != nil {1666 ec.Error(ctx, err)1667 return graphql.Null1668 }1669 if resTmp == nil {1670 return graphql.Null1671 }1672 res := resTmp.([]introspection.Field)1673 fc.Result = res1674 return ec.marshalO__Field2ágithubácomá99designságqlgenágraphqláintrospectionáFieldá(ctx, field.Selections, res)1675}1676func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {1677 defer func() {1678 if r := recover(); r != nil {1679 ec.Error(ctx, ec.Recover(ctx, r))1680 ret = graphql.Null1681 }1682 }()1683 fc := &graphql.FieldContext{1684 Object: "__Type",1685 Field: field,1686 Args: nil,1687 IsMethod: true,1688 IsResolver: false,1689 }1690 ctx = graphql.WithFieldContext(ctx, fc)1691 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1692 ctx = rctx // use context from middleware stack in children1693 return obj.Interfaces(), nil1694 })1695 if err != nil {1696 ec.Error(ctx, err)1697 return graphql.Null1698 }1699 if resTmp == nil {1700 return graphql.Null1701 }1702 res := resTmp.([]introspection.Type)1703 fc.Result = res1704 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)1705}1706func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {1707 defer func() {1708 if r := recover(); r != nil {1709 ec.Error(ctx, ec.Recover(ctx, r))1710 ret = graphql.Null1711 }1712 }()1713 fc := &graphql.FieldContext{1714 Object: "__Type",1715 Field: field,1716 Args: nil,1717 IsMethod: true,1718 IsResolver: false,1719 }1720 ctx = graphql.WithFieldContext(ctx, fc)1721 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1722 ctx = rctx // use context from middleware stack in children1723 return obj.PossibleTypes(), nil1724 })1725 if err != nil {1726 ec.Error(ctx, err)1727 return graphql.Null1728 }1729 if resTmp == nil {1730 return graphql.Null1731 }1732 res := resTmp.([]introspection.Type)1733 fc.Result = res1734 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)1735}1736func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {1737 defer func() {1738 if r := recover(); r != nil {1739 ec.Error(ctx, ec.Recover(ctx, r))1740 ret = graphql.Null1741 }1742 }()1743 fc := &graphql.FieldContext{1744 Object: "__Type",1745 Field: field,1746 Args: nil,1747 IsMethod: true,1748 IsResolver: false,1749 }1750 ctx = graphql.WithFieldContext(ctx, fc)1751 rawArgs := field.ArgumentMap(ec.Variables)1752 args, err := ec.field___Type_enumValues_args(ctx, rawArgs)1753 if err != nil {1754 ec.Error(ctx, err)1755 return graphql.Null1756 }1757 fc.Args = args1758 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1759 ctx = rctx // use context from middleware stack in children1760 return obj.EnumValues(args["includeDeprecated"].(bool)), nil1761 })1762 if err != nil {1763 ec.Error(ctx, err)1764 return graphql.Null1765 }1766 if resTmp == nil {1767 return graphql.Null1768 }1769 res := resTmp.([]introspection.EnumValue)1770 fc.Result = res1771 return ec.marshalO__EnumValue2ágithubácomá99designságqlgenágraphqláintrospectionáEnumValueá(ctx, field.Selections, res)1772}1773func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {1774 defer func() {1775 if r := recover(); r != nil {1776 ec.Error(ctx, ec.Recover(ctx, r))1777 ret = graphql.Null1778 }1779 }()1780 fc := &graphql.FieldContext{1781 Object: "__Type",1782 Field: field,1783 Args: nil,1784 IsMethod: true,1785 IsResolver: false,1786 }1787 ctx = graphql.WithFieldContext(ctx, fc)1788 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1789 ctx = rctx // use context from middleware stack in children1790 return obj.InputFields(), nil1791 })1792 if err != nil {1793 ec.Error(ctx, err)1794 return graphql.Null1795 }1796 if resTmp == nil {1797 return graphql.Null1798 }1799 res := resTmp.([]introspection.InputValue)1800 fc.Result = res1801 return ec.marshalO__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)1802}1803func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {1804 defer func() {1805 if r := recover(); r != nil {1806 ec.Error(ctx, ec.Recover(ctx, r))1807 ret = graphql.Null1808 }1809 }()1810 fc := &graphql.FieldContext{1811 Object: "__Type",1812 Field: field,1813 Args: nil,1814 IsMethod: true,1815 IsResolver: false,1816 }1817 ctx = graphql.WithFieldContext(ctx, fc)1818 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1819 ctx = rctx // use context from middleware stack in children1820 return obj.OfType(), nil1821 })1822 if err != nil {1823 ec.Error(ctx, err)1824 return graphql.Null1825 }1826 if resTmp == nil {1827 return graphql.Null1828 }1829 res := resTmp.(*introspection.Type)1830 fc.Result = res1831 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)1832}1833// endregion **************************** field.gotpl *****************************1834// region **************************** input.gotpl *****************************1835// endregion **************************** input.gotpl *****************************1836// region ************************** interface.gotpl ***************************1837// endregion ************************** interface.gotpl ***************************1838// region **************************** object.gotpl ****************************1839var chatroomImplementors = []string{"Chatroom"}1840func (ec *executionContext) _Chatroom(ctx context.Context, sel ast.SelectionSet, obj *Chatroom) graphql.Marshaler {1841 fields := graphql.CollectFields(ec.OperationContext, sel, chatroomImplementors)1842 out := graphql.NewFieldSet(fields)1843 var invalids uint321844 for i, field := range fields {1845 switch field.Name {1846 case "__typename":1847 out.Values[i] = graphql.MarshalString("Chatroom")1848 case "name":1849 out.Values[i] = ec._Chatroom_name(ctx, field, obj)1850 if out.Values[i] == graphql.Null {1851 invalids++1852 }1853 case "messages":1854 out.Values[i] = ec._Chatroom_messages(ctx, field, obj)1855 if out.Values[i] == graphql.Null {1856 invalids++1857 }1858 default:1859 panic("unknown field " + strconv.Quote(field.Name))1860 }1861 }1862 out.Dispatch()1863 if invalids > 0 {1864 return graphql.Null1865 }1866 return out1867}1868var messageImplementors = []string{"Message"}1869func (ec *executionContext) _Message(ctx context.Context, sel ast.SelectionSet, obj *Message) graphql.Marshaler {1870 fields := graphql.CollectFields(ec.OperationContext, sel, messageImplementors)1871 out := graphql.NewFieldSet(fields)1872 var invalids uint321873 for i, field := range fields {1874 switch field.Name {1875 case "__typename":1876 out.Values[i] = graphql.MarshalString("Message")1877 case "id":1878 out.Values[i] = ec._Message_id(ctx, field, obj)1879 if out.Values[i] == graphql.Null {1880 invalids++1881 }1882 case "text":1883 out.Values[i] = ec._Message_text(ctx, field, obj)1884 if out.Values[i] == graphql.Null {1885 invalids++1886 }1887 case "createdBy":1888 out.Values[i] = ec._Message_createdBy(ctx, field, obj)1889 if out.Values[i] == graphql.Null {1890 invalids++1891 }1892 case "createdAt":1893 out.Values[i] = ec._Message_createdAt(ctx, field, obj)1894 if out.Values[i] == graphql.Null {1895 invalids++1896 }1897 default:1898 panic("unknown field " + strconv.Quote(field.Name))1899 }1900 }1901 out.Dispatch()1902 if invalids > 0 {1903 return graphql.Null1904 }1905 return out1906}1907var mutationImplementors = []string{"Mutation"}1908func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {1909 fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)1910 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{1911 Object: "Mutation",1912 })1913 out := graphql.NewFieldSet(fields)1914 var invalids uint321915 for i, field := range fields {1916 switch field.Name {1917 case "__typename":1918 out.Values[i] = graphql.MarshalString("Mutation")1919 case "post":1920 out.Values[i] = ec._Mutation_post(ctx, field)1921 if out.Values[i] == graphql.Null {1922 invalids++1923 }1924 default:1925 panic("unknown field " + strconv.Quote(field.Name))1926 }1927 }1928 out.Dispatch()1929 if invalids > 0 {1930 return graphql.Null1931 }1932 return out1933}1934var queryImplementors = []string{"Query"}1935func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {1936 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)1937 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{1938 Object: "Query",1939 })1940 out := graphql.NewFieldSet(fields)1941 var invalids uint321942 for i, field := range fields {1943 switch field.Name {1944 case "__typename":1945 out.Values[i] = graphql.MarshalString("Query")1946 case "room":1947 field := field1948 out.Concurrently(i, func() (res graphql.Marshaler) {1949 defer func() {1950 if r := recover(); r != nil {1951 ec.Error(ctx, ec.Recover(ctx, r))1952 }1953 }()1954 res = ec._Query_room(ctx, field)1955 return res1956 })1957 case "__type":1958 out.Values[i] = ec._Query___type(ctx, field)1959 case "__schema":1960 out.Values[i] = ec._Query___schema(ctx, field)1961 default:1962 panic("unknown field " + strconv.Quote(field.Name))1963 }1964 }1965 out.Dispatch()1966 if invalids > 0 {1967 return graphql.Null1968 }1969 return out1970}1971var subscriptionImplementors = []string{"Subscription"}1972func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler {1973 fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors)1974 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{1975 Object: "Subscription",1976 })1977 if len(fields) != 1 {1978 ec.Errorf(ctx, "must subscribe to exactly one stream")1979 return nil1980 }1981 switch fields[0].Name {1982 case "messageAdded":1983 return ec._Subscription_messageAdded(ctx, fields[0])1984 default:1985 panic("unknown field " + strconv.Quote(fields[0].Name))1986 }1987}1988var __DirectiveImplementors = []string{"__Directive"}1989func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {1990 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)1991 out := graphql.NewFieldSet(fields)1992 var invalids uint321993 for i, field := range fields {1994 switch field.Name {1995 case "__typename":1996 out.Values[i] = graphql.MarshalString("__Directive")1997 case "name":1998 out.Values[i] = ec.___Directive_name(ctx, field, obj)1999 if out.Values[i] == graphql.Null {2000 invalids++2001 }2002 case "description":2003 out.Values[i] = ec.___Directive_description(ctx, field, obj)2004 case "locations":2005 out.Values[i] = ec.___Directive_locations(ctx, field, obj)2006 if out.Values[i] == graphql.Null {2007 invalids++2008 }2009 case "args":2010 out.Values[i] = ec.___Directive_args(ctx, field, obj)2011 if out.Values[i] == graphql.Null {2012 invalids++2013 }2014 case "isRepeatable":2015 out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj)2016 if out.Values[i] == graphql.Null {2017 invalids++2018 }2019 default:2020 panic("unknown field " + strconv.Quote(field.Name))2021 }2022 }2023 out.Dispatch()2024 if invalids > 0 {2025 return graphql.Null2026 }2027 return out2028}2029var __EnumValueImplementors = []string{"__EnumValue"}...
___Directive_isRepeatable
Using AI Code Generation
1import (2type ErrorListener struct {3}4func (d *ErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException) {5 fmt.Println("line ", line, ":", column, " ", msg)6}7func main() {8 input, err := antlr.NewFileStream(os.Args[1])9 if err != nil {10 fmt.Println(err)11 os.Exit(1)12 }13 lexer := parser.NewGraphQLLexer(input)14 stream := antlr.NewCommonTokenStream(lexer, 0)15 p := parser.NewGraphQLParser(stream)16 p.AddErrorListener(&ErrorListener{})17 tree := p.Document()18 fmt.Println("Number of errors: ", p.GetNumberOfSyntaxErrors())19 visitor := &MyVisitor{}20 visitor.Visit(tree)21}22type MyVisitor struct {23}24func (v *MyVisitor) VisitDocument(ctx *parser.DocumentContext) interface{} {25 fmt.Println("Visit Document")26 return v.VisitChildren(ctx)27}28func (v *MyVisitor) VisitDefinition(ctx *parser.DefinitionContext) interface{} {29 fmt.Println("Visit Definition")30 return v.VisitChildren(ctx)31}32func (v *MyVisitor) VisitExecutableDefinition(ctx *parser.ExecutableDefinitionContext) interface{} {33 fmt.Println("Visit ExecutableDefinition")34 return v.VisitChildren(ctx)35}36func (v *MyVisitor) VisitOperationDefinition(ctx *parser.OperationDefinitionContext) interface{} {37 fmt.Println("Visit OperationDefinition")38 return v.VisitChildren(ctx)39}40func (v *MyVisitor) VisitSelectionSet(ctx *parser.SelectionSetContext) interface{} {41 fmt.Println("Visit SelectionSet")42 return v.VisitChildren(ctx)43}44func (v *MyVisitor) VisitSelection(ctx *parser.SelectionContext) interface{} {45 fmt.Println("Visit Selection")46 return v.VisitChildren(ctx)47}48func (v *MyVisitor) VisitField(ctx *parser.FieldContext) interface{} {49 fmt.Println("Visit Field")50 return v.VisitChildren(ctx)51}52func (v *MyVisitor) VisitAlias(ctx *parser.AliasContext) interface{} {53 fmt.Println("Visit Alias")54 return v.VisitChildren(ctx)55}56func (
___Directive_isRepeatable
Using AI Code Generation
1import (2func main() {3 directive := &Directive{4 }5 directiveValue := reflect.ValueOf(directive)6 methodValue := directiveValue.MethodByName("___Directive_isRepeatable")7 result := methodValue.Call(nil)8 fmt.Println(result[0].Bool())9}10import (11func main() {12 directive := &Directive{13 }14 directiveType := reflect.TypeOf(directive)15 methodValue := directiveType.MethodByName("___Directive_isRepeatable")16 result := methodValue.Func.Call([]reflect.Value{reflect.ValueOf(directive)})17 fmt.Println(result[0].Bool())18}19import (20func main() {21 directive := &Directive{22 }23 directiveType := reflect.TypeOf(directive)
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!