In order to support fetching more complex data involving user fields, we should use the GraphQL API instead of api/v2. Necessary for querying things like:
{
me {
id
username
userExperiments {
id
enabled
experiment
}
}
}
In a follow-up PR we should add something like graphql-tag to have more robust support for the GraphQL queries
How
Replace the existing userInfo request with an equivalent query using the GraphQL API
Test Plan
Run the website locally and ensure user data is loaded correctly
Why
In order to support fetching more complex data involving user fields, we should use the GraphQL API instead of
api/v2
. Necessary for querying things like:In a follow-up PR we should add something like
graphql-tag
to have more robust support for the GraphQL queriesHow
Replace the existing
userInfo
request with an equivalent query using the GraphQL APITest Plan
Run the website locally and ensure user data is loaded correctly