menu

Apollo

A community of developers, designers and others who love Apollo and GraphQL. 🚀

Channels
# All channels
view-forward
# General
view-forward
# Apollo Angular
view-forward
# Announcements
view-forward
# Apollo Android
view-forward
# Apollo Client
view-forward
# Apollo iOS
view-forward
# Apollo Link
view-forward
# Apollo Link Rest
view-forward
# Local State
view-forward
# Apollo Platform
view-forward
# Apollo Server
view-forward
# Apollo Tooling
view-forward
# Contributing
view-forward
# Docs
view-forward
# Events
view-forward
# GraphQL Tools
view-forward
# Jobs
view-forward
# Random
view-forward
# React Apollo
view-forward
# Showcase
view-forward
# Subscriptions
view-forward
# Testing
view-forward
# Vue Apollo
view-forward
Team

Best practices for type conflicts after schema stitching

February 16, 2019 at 1:33am

Best practices for type conflicts after schema stitching

February 16, 2019 at 1:33am
I often have conflicts between types written in different schema files and having the same name. Is there a way to write types that are local to a file/namespace? Or best practices to help avoiding this?

February 16, 2019 at 4:54am
Are these all schemas for your organization? According to recommended best practices for intra-organization schemas, the types should all be defined in relation to each other in one schema. If they're 3rd party schemas, then I think the only way to handle it is to transformSchema, though I admit it seems verbose and should be something that can be done automatically (automatic namespace prefixing). As far as I know, such a feature does not exist yet.
  • reply
  • like

February 16, 2019 at 4:41pm
Yes they are all schemas for my organization. I managed to define the same type twice in a large file, and got no warning whatsoever when running my server... Which led to a bad bug
  • reply
  • like