# Update Documentation for GraphQL for Nodejs

**URL:** <https://community.prismic.io/t/update-documentation-for-graphql-for-nodejs/2968>\
**Category:** Developing with Prismic\
**Tags:** nodejs\
**Created:** [December 2, 2020, 6:50am UTC](https://community.prismic.io/t/update-documentation-for-graphql-for-nodejs/2968 "2020-12-02T06:50:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![semkoo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/semkoo/32/1315_2.png) [@semkoo](https://community.prismic.io/u/semkoo)\
**Post date:** [December 2, 2020, 6:50am UTC](https://community.prismic.io/t/update-documentation-for-graphql-for-nodejs/2968/1 "2020-12-02T06:50:38Z")

</div>

We should be using the latest apollo/client but if you want to approach with Node.js either you import or require form `@apollo/client/core`

```auto
//Node.js Example 
// npm install @apollo/client graphql apollo-link-prismic --save
import { PrismicLink } from 'apollo-link-prismic';
import { ApolloClient, InMemoryCache, gql } from '@apollo/client/core';

import config from '~/config';

const client = new ApolloClient({
  link: PrismicLink({
    uri: config.PRISMIC_URI,
    accessToken: config.PRISMIC_ACCESS_TOKEN,
  }),
  cache: new InMemoryCache(),
});
....
const { data } = (await client.query({
          query: gql`
             query($lang: String!) {
                 blog(uid: "some_id", lang: $lang) {
                    ... 
                 }
             }
          `, 
         variables: {
            lang,
          },
        })
      ).data;

```

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [December 2, 2020, 6:34pm UTC](https://community.prismic.io/t/update-documentation-for-graphql-for-nodejs/2968/2 "2020-12-02T18:34:25Z")

</div>

Hello Semir, welcome to the Prismic community!

Thanks for the insight. Is this recommendation based on an example project that you saw in the documentation, or an article, if it is, could you share it with me?

You're saying it'll be useful to use `@apollo/client/core` instead of `appollo-client` from npm, is that right ?

---

<div class="post-metadata">

**Author:** ![semkoo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/semkoo/32/1315_2.png) [@semkoo](https://community.prismic.io/u/semkoo)\
**Post date:** [December 2, 2020, 7:41pm UTC](https://community.prismic.io/t/update-documentation-for-graphql-for-nodejs/2968/4 "2020-12-02T19:41:31Z")

</div>

Hi Paulina and thank you

Yes I would suggest to use the [@apollo/client](https://www.npmjs.com/package/@apollo/client) as they have the latest patches and if you want to use it for Node.JS you would have to import it under core, ex: `@apollo/client/core`.

The reason I want to suggest this is because using the old `appollo-client` you would run into a common warning error known as `heuristic fragment`. There is a [solution](https://medium.com/commutatus/whats-going-on-with-the-heuristic-fragment-matcher-in-graphql-apollo-client-e721075e92be) but I don't want to build an extra layer work around, and this is fixed within the `@apollo/client`.

I have experienced this, because when running `query(...){...}` on ` https://project.prismic.io/graphql` works out perfectly, but when trying to run the query in the client of `appollo-client` the warning kicks off.

Anyhow I hope this helps out to anyone out there

Regards,  
Semir

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [December 2, 2020, 8:44pm UTC](https://community.prismic.io/t/update-documentation-for-graphql-for-nodejs/2968/5 "2020-12-02T20:44:12Z")

</div>

That is very helpful, I'll add this information to the Education team backlog so we can have it in mind for future improvements in documentations and sample projects.

Could you point to me where you saw that we suggest/recommend this configuration? So that i have it in mind

Thanks again for the feedback

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [December 11, 2020, 4:13am UTC](https://community.prismic.io/t/update-documentation-for-graphql-for-nodejs/2968/8 "2020-12-11T04:13:06Z")

</div>

This issue has been closed due to inactivity. [Flag to reopen](https://community.prismic.io/t/re-open-a-thread/2175).

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 5:00pm UTC](https://community.prismic.io/t/update-documentation-for-graphql-for-nodejs/2968/9 "2021-12-09T17:00:37Z")

</div>


