diff --git a/src/pages/[platform]/build-a-backend/data/connect-from-server-runtime/nuxtjs-server-runtime/index.mdx b/src/pages/[platform]/build-a-backend/data/connect-from-server-runtime/nuxtjs-server-runtime/index.mdx index 939456e92df..5e81ad2c948 100644 --- a/src/pages/[platform]/build-a-backend/data/connect-from-server-runtime/nuxtjs-server-runtime/index.mdx +++ b/src/pages/[platform]/build-a-backend/data/connect-from-server-runtime/nuxtjs-server-runtime/index.mdx @@ -134,10 +134,6 @@ import type { LibraryOptions, FetchAuthSessionOptions, } from "@aws-amplify/core"; -import type { - GraphQLOptionsV6, - GraphQLResponseV6, -} from "@aws-amplify/api-graphql"; import outputs from "../amplify_outputs.json"; @@ -309,15 +305,12 @@ export default defineNuxtPlugin({ client: { // Follow this typing to ensure the`graphql` API return type can // be inferred correctly according to your queries and mutations - graphql: < - FALLBACK_TYPES = unknown, - TYPED_GQL_STRING extends string = string - >( - options: GraphQLOptionsV6, - additionalHeaders?: Record + graphql:( + options: Parameters[1], + additionalHeaders?: Record ) => runWithAmplifyServerContext< - GraphQLResponseV6 + ReturnType >(amplifyConfig, libraryOptions, (contextSpec) => gqlServerClient.graphql( contextSpec, diff --git a/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx b/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx index dd6cb35e20f..603e2dbcc7d 100644 --- a/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx +++ b/src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nuxt/index.mdx @@ -145,10 +145,6 @@ import type { LibraryOptions, FetchAuthSessionOptions } from '@aws-amplify/core'; -import type { - GraphQLOptionsV6, - GraphQLResponseV6 -} from '@aws-amplify/api-graphql'; import config from '../amplifyconfiguration.json'; @@ -328,24 +324,21 @@ export default defineNuxtPlugin({ client: { // Follow this typing to ensure the`graphql` API return type can // be inferred correctly according to your queries and mutations - graphql: < - FALLBACK_TYPES = unknown, - TYPED_GQL_STRING extends string = string - >( - options: GraphQLOptionsV6, - additionalHeaders?: Record + graphql:( + options: Parameters[1], + additionalHeaders?: Record ) => runWithAmplifyServerContext< - GraphQLResponseV6 + ReturnType >(amplifyConfig, libraryOptions, (contextSpec) => gqlServerClient.graphql( contextSpec, options, additionalHeaders ) - ) - } - } + ), + }, + }, } } };