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

runtime $settings not exported from nexus-prisma #57

Closed
seanogdev opened this issue May 23, 2021 · 2 comments · Fixed by #60
Closed

runtime $settings not exported from nexus-prisma #57

seanogdev opened this issue May 23, 2021 · 2 comments · Fixed by #60
Assignees
Labels
type/bug Something is not working the way it should

Comments

@seanogdev
Copy link

seanogdev commented May 23, 2021

Screenshot

image

Description

Apologies if i'm missing something

Was seeing this error being thrown for a nested resolver
'Prisma client not found in context. Set a Prisma client instance to 'prisma' field of Nexus context'

Looking into it & after seeing the docs were updated to say you could customise the prismaClientContextField using $settings, but I'm seeing this error when trying

image

Had a look into it & also noticed this, should that also be if (!ctx[settings.runtime.data.prismaClientContextField]) (once its configurable that is)?

@seanogdev seanogdev added the type/bug Something is not working the way it should label May 23, 2021
@seanogdev seanogdev changed the title $settings not exported from nexus-prisma runtime $settings not exported from nexus-prisma May 23, 2021
@jasonkuhrt
Copy link
Contributor

jasonkuhrt commented May 26, 2021

Available in 0.27.1. Thanks for reporting! This feature was badly missing about half its implementation, but fully documented 🤦.

@seanogdev
Copy link
Author

Thanks for the quick fix @jasonkuhrt ❤️ , looking forward to seeing the evolution of this lib :)

@jasonkuhrt jasonkuhrt self-assigned this May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is not working the way it should
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants