graphql-compose / graphql-compose/graphql-compose-mongoose
Odd Resolution Name
- Dominant language
- TypeScript
- Stars
- 706
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
I'm getting this
`user(_id: MongoID!): EventPartyGuestProfile`
When I am expecting this,
`user(_id: MongoID!): UserAccount`
Here's my sequence,
```
// user_account.js
export const UserAccountSchema = new mongoose.Schema(
...
);
export const UserAccount = mongoose.model('UserAccount', UserAccountSchema);
// user_account_type_composer.js
import { UserAccount } from '../schema/user_account';
const UserAccountTC = composeWithMongoose(UserAccount);
export default UserAccountTC;
// resolvers.js
import UserAccountTC from './user_account_type_composer';
export const queryFields = {
user: UserAccountTC.getResolver('findById'),
users: UserAccountTC.getResolver('findByIds'),
};
//
import { ComposeStorage } from 'graphql-compose';
import moduleUserAccount from './user_account';
const GQC = new ComposeStorage();
GQC.rootQuery().addFields({
...moduleUserAccount.resolvers.queryFields
});
const schema = GQC.buildSchema();
```
At one point, I may have passed the wrong model name to composeWithMongoose function (
const UserAccountTC = composeWithMongoose(EventPartyGuestProfile) ), but changed the name and restarted the server several times since. I've also changed the name of the query fields with no problem. Where could this be coming from?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.