Skip to content

Explorer overriding results #387

Description

@mdugue

Hi,

First of all: 1. I'm not sure if this is ideed a bug but it looks pretty much like this to me. 2. I'm more than grateful for this great tooling and the work being done on it!

I just stumbled on a problem, which I think can be boiled down to this: When I send 2 queries to the same top-level schema-Query field with different selections – but same variables or none –, only one of them will be visible in the DevTools Explorer. For example, sending those 2 queries:

const FIRST_MAXCP_QUERY = gql`
query Pokemon {
  __typename
  pokemon(id: "001") {
    id
    maxCP
  }
}
`

and

const FIRST_NAME_QUERY = gql`
query Pokemon {
  __typename
  pokemon(id: "001") {
    __typename
    id
    name
  }
}

leads to either name or maxCP beeing shown in the Devtools Explorer (apparently the first response coming in)

image

Why is this happening, shouldn't the results be either merged or shown as 2 different entries? Is this related to the devtools at all or rather to internal caching? (Btw: I couldn't see any difference between standard document cache and graphcache)

reproducible via https://codesandbox.io/s/urql-devtools-overriding-results-kqr91

Thanks a lot in advance!!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions