nautilus / gateway

A federated api gateway for graphql services. https://gateway.nautilus.dev/
MIT License
397 stars 49 forks source link

Fix error `error adding scrub fields: could not find field for point %s` for aliases #127

Closed prokaktus closed 3 years ago

prokaktus commented 3 years ago

Hello!

When I'm trying to build query, which affects different locations with aliases, I got error: error adding scrub fields: could not find field for point %s

Example:

# schema

# location: users
type User {
    firstName: String!
    catPhotos: [CatPhoto!]!
}

type Query {
    allUsers: [User!]!
}

# location: cats
type CatPhoto {
    URL: String!
}
# query
{
    users: allUsers {
        firstName
        catPhotos {
            URL
        }
    }
}

I tried to reproduce this with test and possible fix: https://github.com/nautilus/gateway/pull/126

Thanks!

prokaktus commented 3 years ago

PR https://github.com/nautilus/gateway/pull/126 is merged, so I'm closing this issue.

Thanks @AlecAivazis!