@Test public void testDefineCategoriesQuery() { final String coreString = extractQueryString(-1); Assert.assertNotNull(coreString); Assert.assertTrue(coreString.trim().length() > 0); Assert.assertEquals(coreString, extractQueryString(0)); checkQueryString(coreString, 0); checkQueryString(coreString, 1); checkQueryString(coreString, 2); checkQueryString(coreString, NavigationImpl.MAX_STRUCTURE_DEPTH); }
static CategoryTreeQueryDefinition defineCategoriesQuery(int depth) { if (depth <= 0) { return CATEGORIES_QUERY::apply; } else { return t -> CATEGORIES_QUERY.apply(t).children(defineCategoriesQuery(depth - 1)); } }
GraphQLCategoryProvider { static CategoryTreeQueryDefinition defineCategoriesQuery(int depth) { if (depth <= 0) { return CATEGORIES_QUERY::apply; } else { return t -> CATEGORIES_QUERY.apply(t).children(defineCategoriesQuery(depth - 1)); } } }
GraphQLCategoryProvider { static CategoryTreeQueryDefinition defineCategoriesQuery(int depth) { if (depth <= 0) { return CATEGORIES_QUERY::apply; } else { return t -> CATEGORIES_QUERY.apply(t).children(defineCategoriesQuery(depth - 1)); } } GraphQLCategoryProvider(Resource resource, Page page); }
GraphQLCategoryProvider { static CategoryTreeQueryDefinition defineCategoriesQuery(int depth) { if (depth <= 0) { return CATEGORIES_QUERY::apply; } else { return t -> CATEGORIES_QUERY.apply(t).children(defineCategoriesQuery(depth - 1)); } } GraphQLCategoryProvider(Resource resource, Page page);  }
GraphQLCategoryProvider { static CategoryTreeQueryDefinition defineCategoriesQuery(int depth) { if (depth <= 0) { return CATEGORIES_QUERY::apply; } else { return t -> CATEGORIES_QUERY.apply(t).children(defineCategoriesQuery(depth - 1)); } } GraphQLCategoryProvider(Resource resource, Page page);   }