Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for showing fns which aren't implemented in the Type resolver fns #5

Open
orta opened this issue Dec 31, 2023 · 1 comment
Labels
enhancement New feature or request type: feature New enhancement or request

Comments

@orta
Copy link
Member

orta commented Dec 31, 2023

Overview

type User implements Node {
    id: ID!
    slug: String!
    homepage: String!
    accountPage: String!
}

service/user.ts

const User: UserTypeResolvers = {
   homepage: ({root }) =>  "/user/" +root.slug,
   |
}

Auto-complete at the bar, should have id, slug, accountPage

Right now we only use existence of a fn in the service to indicate that there should be a type there.

IMO, we probably want UserTypeResolvers to be fully optional with all possible examples. We can still tighten the fns on the type when they are used, but we do need to be wary that there can be multiple places where a type can have resolvers added

@orta orta added enhancement New feature or request type: feature New enhancement or request labels Dec 31, 2023
@orta
Copy link
Member Author

orta commented Feb 8, 2024

I've been wondering if the answer to this is maybe a separate file which would contain a version of UserTypeResolvers but be UserTypeResolversBase which contains the optional fns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request type: feature New enhancement or request
Projects
None yet
Development

No branches or pull requests

1 participant