graphql-tools
graphql-tools copied to clipboard
`rewireTypes` should recreate types only when necessary
see https://github.com/graphql/graphql-js/pull/3596#issuecomment-1130551613
mapSchemachanges only the requested types, and then callsrewireTypeswhich unfortunately recreates ALL schema types. This ensures that all fields on all types are pointing to the new types, but it may often be overkill.
basically, we would have to change rewireTypes to work in two stages, first to crawl the schema and determine what actually needs to be recreated, and then to iterate through that and recreate only what's necessary.