How can I override a type using graphql-import? I'...
# prisma-whats-new
v
How can I override a type using graphql-import? I'm trying to redeclare the type, but the type is just ignored.
a
Don't import it, copy it and change it
Make sure to import any 'related' types though
v
I'm not importing it, other types that I am importing that have relation with this type
graphql-import
act like I'm import the type, but I'm not
a
So even if you declare the type in your main schema,
graphql-import
is still overwriting that with the old definition because the type is referenced on other types you import, is that the case?
v
ok, I was defining the type in another file and importing it in the main schema, this cause the behavior that I was describing
If I declare the type in the main schema, then it behaves as expected
a
Okay, if you have a clear use case when it's not working like expected, would you mind creating a small repo for easy reproduction and create an issue in the
graphql-import
repo?
v
ok