Skip to content

Adding different error links for different endpoints #430

Description

@f1devrouaa

We are trying to pass an apollo link object instead of string to the two endpoints but we are getting error that the apollo link is not assignable to type string.

  return new ApolloClient({
    ssrMode: typeof window === 'undefined',
    link: ApolloLink.from([
      new MultiAPILink({
          endpoints: {
              laravel: {
                  link: ApolloLink.from([
                      authLink,
                      errorLink,
                      httpLink
                  ])
              },
              wordpress: {
                  link: ApolloLink.from([
                      authLinkwp,
                      errorLinkwp,
                      httpLinkwp
                  ])
              }
          } 
      })
  ]),
  cache: new InMemoryCache(),
  });
}

How can this be fixed and how can we add different cache for each

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions