#StackBounty: #graphql #apollo-server #express-graphql #graphql-tools Handle graphql schema stitching error in child query

Bounty: 50

I am new to graphql and want to understand the concept here. I have this graphql schema (stitched using graphic-tools). Not all cars have registration. So if I query for 5 cars and one car doesn’t have a registration (no id to link between cars and registration), my whole query fails.

How do I handle this and return null for that 1 car and return registration details for the other 4?

{
  Vehicles {
    Cars {
      id
      registration {
        id
      }
    }
  }
}


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.