Open12

GitHub草収穫

Gen TamuraGen Tamura

Github GraphQLでユーザの草を収穫するクエリ

https://docs.github.com/en/graphql/overview/explorer

# Type queries into this side of the screen, and you will
# see intelligent typeaheads aware of the current GraphQL type schema,
# live syntax, and validation errors highlighted within the text.

# We'll get you started with a simple query showing your username!
query {
  user(login: "gentamura") {
    contributionsCollection {
      earliestRestrictedContributionDate
      latestRestrictedContributionDate
      contributionCalendar {
        totalContributions
        colors
        weeks {
          contributionDays {
            date
            weekday
            color
            contributionCount
            contributionLevel
          }
        }
      }
    }
  }
}

Gen TamuraGen Tamura

Next.js + next-authで実装しようと思ったけど、dreiが上手いこと動かなかった。
ので、素のReact + Auth0で。

Gen TamuraGen Tamura

https://auth0.com/docs/connections/calling-an-external-idp-api

IdPでAuth0で認証するとプロバイダのaccess tokenが取れる。という話。
SPAでも上手いこと隠してくれるのかしらと思ったら、

First, you will build a process in your backend that will implement the steps included in the backend section of this article, and expose it to your application as an API.

ですよねー。
せっかくなので学習のためにBackendを実装しよう。