UNPKG

chimp

Version:

Your development companion for doing quality, faster.

26 lines (23 loc) 658 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const getFederatedEntities_1 = tslib_1.__importDefault(require("./getFederatedEntities")); const gql = (a) => a[0]; test('get the non extended types with apollo key annotation', () => { const schemaString = gql ` type TodoItem @key(fields: "id") { id: ID! list: List } extend type List { id: ID! todos: [TodoItem!]! incompleteCount: Int! } type InMemory { id: ID! } `; const res = (0, getFederatedEntities_1.default)(schemaString); expect(res).toEqual(['TodoItem']); });