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

Reference resolver #1108

Closed
Samuelasare85 opened this issue Jun 23, 2023 · 2 comments
Closed

Reference resolver #1108

Samuelasare85 opened this issue Jun 23, 2023 · 2 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@Samuelasare85
Copy link

We are using apollo graphql for our project. We have a service called employee service with the reference resolvers written over there.
type time_tracker {
id: Int
user_id: Int
task_name: String
project_name: String
category: String
employee_bio: EmployeeBio
}

type EmployeeBio @key(fields: "user_id", resolvable: false) {
user_id: ID!
}

@time_tracker.field("employee_bio")
def resolve_employee_bio(obj, user_id):
return {"user_id": user_id}

This returns only the user_id with the other fields as null

Type from employee service
type EmployeeBio @key(fields: "user_id") @Shareable {
id: ID!
user_id: ID!
first_name: String
last_name: String
other_name: String
full_name: String
}

@rafalp
Copy link
Collaborator

rafalp commented Jun 27, 2023

Hello, can you please provide more context for this issue?

@rafalp rafalp added help wanted Extra attention is needed question Further information is requested labels Jun 27, 2023
@SamuelAsare
Copy link

Solved, thanks

@rafalp rafalp closed this as completed Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants