How to use the graphql-tools.MockList function in graphql-tools

To help you get started, we’ve selected a few graphql-tools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mrdulin / apollo-server-express-starter / src / mocking / mockList.spec.js View on Github external
paginatedFriends: (o, { pageNo }) => {
        // console.log('pageNo: ', pageNo);
        return new MockList(pageNo * PAGE_SIZE, () => {
          return { id: casual.id, name: casual.name };
        });
      }
    };
github mrdulin / apollo-server-express-starter / src / mocking / mockList.spec.js View on Github external
allUsers: () => {
        const mockList = new MockList([USER_MIN_NUM, USER_MAX_NUM], (source, args, context, info) => {
          return { id: casual.id, name: casual.name };
        });
        // console.log('mockList: ', mockList);
        return mockList;
      },
      user: (source, { id }, context, info) => {
github newsuk / times-components / packages / provider-test-tools / src / edition.js View on Github external
StandardSectionSlice: () => ({
            __typename: "LeadOneFullWidthSlice",
            items: new MockList(1)
          }),
          StandardSlice: () => ({
github newsuk / times-components / packages / provider-test-tools / src / author-profile.js View on Github external
list(_, { first }) {
                return new MockList(Math.min(count, first));
              }
            }
github ojkelly / bunjil / tests / integration / schemaMerging.spec.ts View on Github external
                topPosts: () => new MockList(topPostsLimit),
                User: () => ({
github amazeeio / lagoon / services / api / src / mocks.js View on Github external
  allGroups: () => new MockList(9),
  allProjectsInGroup: () => new MockList(5),