Apollo-prismic-link Warn: You are calling concat on a terminating link, which will have no effect

HI i get this warning

 You are calling concat on a terminating link, which will have no effect                                                                                         13:08:00  

  at new LinkError (node_modules\apollo-link\lib\linkUtils.js:28:28)
  at Object.exports.concat (node_modules\apollo-link\lib\link.js:45:39)
  at ApolloLink.concat (node_modules\apollo-link\lib\link.js:71:24)
  at node_modules\apollo-link\lib\link.js:20:64
  at Array.reduce (<anonymous>)
  at from (node_modules\apollo-link\lib\link.js:20:30)
  at createApolloClient (server.js:3500:35)
  at module.exports../.nuxt/apollo-module.js.__webpack_exports__.default (server.js:417:126)
  at createApp (server.js:1330:93)
  at async module.exports../.nuxt/server.js.__webpack_exports__.default (server.js:1730:7)

i use it like this with nuxt-apollo

import { PrismicLink } from 'apollo-link-prismic'

import { InMemoryCache } from 'apollo-cache-inmemory'

import ApolloClient from 'apollo-client'

const client = new ApolloClient({

  link: PrismicLink({

    uri: process.env.PRISMIC

  }),

  cache: new InMemoryCache(),

  defaultHttpLink: false

})

export default () => client

nuxt config.js

apollo: {

    clientConfigs: {

      default: '~/plugins/apollo.js'

    }

  }

Hey Marko,

This one seemed to fall through the cracks. I really apologise about this.

Did you find a solution for this?

I found some information on stackoverflow that seems to be related to this and it might help to put Http Link at the end of the PrismicLink array.

Let me know if this helps and sorry again.

Hi,

I got the exact same issue and can’t solve it. Here is my plugin file:

import { PrismicLink } from 'apollo-link-prismic'
import { InMemoryCache } from 'apollo-cache-inmemory'
import ApolloClient from 'apollo-client'

const client = new ApolloClient({
  link: PrismicLink({
    uri: 'https://repo.prismic.io/graphql',
    accessToken: "xoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxo"
  }),
  cache: new InMemoryCache(),
  defaultHttpLink: false
})

export default () => client

Thanks for your help.

Hi,

Welcome to the community!

Can you try putting Http Link at the end of the PrismicLink array?

import { PrismicLink } from 'apollo-link-prismic'
import { InMemoryCache } from 'apollo-cache-inmemory'
import ApolloClient from 'apollo-client'

const client = new ApolloClient({
  link: PrismicLink({
    uri: 'https://repo.prismic.io/graphql',
    accessToken: "xoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxo",
    defaultHttpLink: false
  }),
  cache: new InMemoryCache()
})

export default () => client

Thanks

Hi Phil, thanks for your answer, however the error is still showing…

Can you try this?

import { PrismicLink } from 'apollo-link-prismic'
import { InMemoryCache } from 'apollo-cache-inmemory'
import ApolloClient from 'apollo-client'

const client = new ApolloClient({
  cache: new InMemoryCache(),
  defaultHttpLink: false,
  link: PrismicLink({
    uri: 'https://repo.prismic.io/graphql',
    accessToken: "xoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxo"
  }),
})

export default () => client

I’m still getting the same error :frowning:

Can you zip up your project and send it to me in a private message?

Hey Alexis,

I really tried to figure out what the issue is here, but I’m afraid I’m not sure what the issue is.

I’ve passed this to the dev team, hopefully they can help me figure this one out. We’ll up date you here once we know more.

Thanks.

Hey, I’m not sure what’s going on either but could not reproduce the terminating link error.

What I did:

Can you give us your Prismic api endpoint and the version of prismic-apollo-link you’re using? Thanks!

This issue has been closed due to inactivity.