Recent Topics

Graphql error 'Duplicate definition cartDetail found when merging'



  • Hi all,
    I've installed GraphQL by following instruction on https://github.com/bagisto/headless-ecommerce. I've also installed Lighthouse.

    When I try to launch an Authentication request on my server (both with Postman or graphql-playground) I have the following message: 'Duplicate definition cartDetail found when merging' Screenshot at ago 19 12-20-06.png.

    I've alo tryed to add Params and Headers:
    Screenshot at ago 19 12-22-36.png Screenshot at ago 19 12-23-07.png
    but I still have the same error
    Screenshot at ago 19 12-24-22.png

    What am I doing wrong?

    Thank you in advance!



  • anyone who installed Graphql?



  • @wallace did you manage to sort this out? There doesn't seem to be enough help around here 😞



  • @wallace hey Idk if you've figured it out but the issue was in the schema.graphql file. The documentation says

    ' put all shop schemas #import /shop//.graphql after #import /promotion/*.graphql this line.'

    This is what caused the error. The shop schemas are already imported on the top and then when we do at the bottom, it says that its duplicating. Just remove that line and it works like charm.

    Hope this helps 🙂


Log in to reply