-
Notifications
You must be signed in to change notification settings - Fork 460
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 ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typed NhostClient #2623
Comments
I've now tried apollo with official integration with react that didn't work for me as I don't use react. I also attempted trying to pass in jwt bearer token and that resulted in jwt error when using apollo directly. I used env variable for hasura endpoint as a link.
|
I guess you could check how we do it in our dashboard: https://github /nhost/nhost/blob/main/dashboard/graphql.config.yaml We also wrote a blog post about this topic some time ago: https://nhost.io/blog/graphql-code-generator-maximizing-graphql-development-typescript Hopefully this sets you in the right track. |
I don't use react. Reason why that I mentioned prisma is that I believe that it must do things in a way that lets you get types without relying on some react preset however much I'm find with using apollo which is also pretty react. Can you at very least bother documenting how I'm suppose to connect to nhost WITHOUT the react or your nhost client that WILL NOT support typescript. |
I still can't really tell how to use anything but nhost react because the API is undocumented. |
While I understand we don't provide a tutorial using the SDK, you can find the JS/TS SDK reference documentation here: https://docs.nhost.io/reference/overview#client-libraries For instance: https://docs.nhost.io/reference/javascript/auth/change-email And you can find the API documentation here: https://docs.nhost.io/reference/auth/sign-up-email-and-password |
I take your point, but is there API reference for connecting to nhost with
apollo but without apollo react? I tried passing in hasura and nhost env
variables and it's not working. It's not about authenticating a user, I
want to connect as admin/server. It's a relatively straightforward enough
ask so as not to expect me to go through how you handle connections.
…On Mon, Apr 8, 2024 at 10:45 AM David Barroso ***@***.***> wrote:
While I understand we don't provide a tutorial using the SDK, you can find
the JS/TS SDK reference documentation here:
https://docs.nhost.io/reference/overview#client-libraries
For instance:
https://docs.nhost.io/reference/javascript/auth/change-email
And you can find the API documentation here:
https://docs.nhost.io/reference/auth/sign-up-email-and-password
—
Reply to this email directly, view it on GitHub
<#2623 (comment)>, or
unsubscribe
<https://github /notifications/unsubscribe-auth/ACWP5ANS4WDCZHKQNIM3CJDY4IVHBAVCNFSM6AAAAABFNBZTESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRHEYDSMRTHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is your feature request related to a problem? Please describe.
I'm unclear as to how to do codegen to have typed gql requests.
Describe the solution you'd like
Prisma lets you generate DB schema and types from schema config files in repo. But by and large I can't be asked to switch gql package with types support because I can't tell how to pass in adminSecret, or what the endpoint looks like, etc.
Describe alternatives you've considered
I considered using graphql-request package instead, and applying some codegen preset thing for my use case (typed gql). The documentation is bad and linked to low-level implementation at first.
Additional context
I'm using nhost for server-side, so I just care about types with none of the other bells and whistles.
The text was updated successfully, but these errors were encountered: