'How i can resolve conflict type AcfLink

I have a problem with Gatsby, I have a type conflict in Link relation in WordPress

Fields "button" conflict because they return conflicting types AcfLink and String. Use different aliases on the fields to fetch both if this was intentional.

 Error path: undefined

in query request

button {
      url
      title
    }

How do I resolve this conflict



Solution 1:[1]

You can alias both fields with:

button {
      newName1: url
      newName2: title
    }

After that, you will need to refer to each field using button.newName1 and button.newName2 respectively.

GraphQL aliases docs: https://graphql.org/learn/queries/#aliases

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ferran Buireu