diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3d506ee678e8c4fb3d0ade6c051919f2a248b654..859a1668496cba3937ae9ab9814cdd8273a89757 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,7 +16,6 @@ Added * Provide API endpoint for system status. * [Dev] UpdateIndicator Vue Component to display the status of interactive pages * [Dev] DeleteDialog Vue Component to unify item deletion in the new frontend -* Use build-in mechanism in Apollo for GraphQL batch querying. Changed diff --git a/aleksis/core/frontend/app/apollo.js b/aleksis/core/frontend/app/apollo.js index 519bc24aa5d7920d6433d4eebef1b38673753907..267997b9f93ba8d992a90093a93e650f32995811 100644 --- a/aleksis/core/frontend/app/apollo.js +++ b/aleksis/core/frontend/app/apollo.js @@ -2,12 +2,11 @@ * Configuration for Apollo provider, client, and caches. */ -import { ApolloClient, from } from "@/apollo-boost"; +import { ApolloClient, HttpLink, from } from "@/apollo-boost"; import { RetryLink } from "@/apollo-link-retry"; import { persistCache, LocalStorageWrapper } from "@/apollo3-cache-persist"; import { InMemoryCache } from "@/apollo-cache-inmemory"; -import { BatchHttpLink } from "@/apollo-link-batch-http"; // Cache for GraphQL query results in memory and persistent across sessions const cache = new InMemoryCache(); @@ -34,17 +33,14 @@ const links = [ // Automatically retry failed queries new RetryLink(), // Finally, the HTTP link to the real backend (Django) - new BatchHttpLink({ + new HttpLink({ uri: getGraphqlURL(), - batchInterval: 200, - batchDebounce: true, }), ]; /** Upstream Apollo GraphQL client */ const apolloClient = new ApolloClient({ cache, - shouldBatch: true, link: from(links), }); diff --git a/aleksis/core/settings.py b/aleksis/core/settings.py index af0d1e5eb70fb645ea64f6fa25b2a205c72b3402..0dab04a6c8b1624adee973cc6c96d33334f372b2 100644 --- a/aleksis/core/settings.py +++ b/aleksis/core/settings.py @@ -588,7 +588,6 @@ YARN_INSTALLED_APPS = [ "@iconify/json@^2.1.30", "@mdi/font@^6.9.96", "apollo-boost@^0.4.9", - "apollo-link-batch-http@^1.2.14", "apollo-link-retry@^2.2.16", "apollo3-cache-persist@^0.14.1", "deepmerge@^4.2.2", diff --git a/aleksis/core/urls.py b/aleksis/core/urls.py index 5abfc2b7c74408b83dce1f9fe5758b00e754d6a9..9792fcb75cd1e7197cda1f1e6707c3eb42ed1d3e 100644 --- a/aleksis/core/urls.py +++ b/aleksis/core/urls.py @@ -27,7 +27,7 @@ urlpatterns = [ path("__icons__/", include("dj_iconify.urls")), path( "graphql/", - csrf_exempt(views.LoggingGraphQLView.as_view(batch=True)), + csrf_exempt(views.LoggingGraphQLView.as_view(graphiql=True)), name="graphql", ), path("logo", force_maintenance_mode_off(views.LogoView.as_view()), name="logo"),