You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think you might be able to solve this with the merge-graphql-schema package.
// ./graphql/types/index.js
import { mergeTypes } from 'merge-graphql-schemas';
import clientType from './clientType';
import productType from './productType';
const types = [
clientType,
productType,
];
// NOTE: 2nd param is optional, and defaults to false
// Only use if you have defined the same type multiple times in
// different files and wish to attempt merging them together.
export default mergeTypes(types, { all: true });
and
Leads to
Type "Article" was defined more than once.
Removing imports from there and extracting them to separate file and then:
Leads to
Field articles: Couldn't find type Article in any of the schemas.
Is there a way to handle this?
PS
No, I can't do like this:
I need conditional import
The text was updated successfully, but these errors were encountered: