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

Fix getCurrentUser type to get rid of red squiggles #6329

Merged
merged 8 commits into from
Sep 2, 2022

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Aug 31, 2022

Fixes #6328

(This PR is continued/fixed over here: #6340)

Here's the red squiggly we see inside createGraphQLHandler

image

image

Now let's take a look at when/how getCurrentUser is called inside the FW. Again, as seen in the first screenshot it's passed into createGraphQLHandler

image

So we need to align all three different types used for the same thing here.

The solution isn't perfect. But it's better than it was. No more red squiggles, and not a bunch of new anys. I think this is good enough as a stop gap solution until we've fully decoupled auth and we more naturally get different types depending on what provider you're using.

@Tobbe Tobbe added the release:fix This PR is a fix label Aug 31, 2022
@Tobbe Tobbe marked this pull request as ready for review August 31, 2022 20:20
@Tobbe Tobbe changed the title Fix auth.ts.template return type Fix getCurrentUser type to get rid of red squiggles Aug 31, 2022
@Tobbe Tobbe merged commit 4835edc into redwoodjs:main Sep 2, 2022
@Tobbe Tobbe deleted the tobbe-graphql-fn-ts branch September 2, 2022 19:08
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Sep 2, 2022
jtoar pushed a commit that referenced this pull request Sep 3, 2022
@Tobbe Tobbe mentioned this pull request Sep 4, 2022
@jtoar jtoar modified the milestones: next-release, v3.0.0 Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug?]: getCurrentUser isn't properly typed in graphql.ts
4 participants