Customizing facebook auth


Hi, i’m trying to customize the my own facebook auth based on the facebookauthentication template, but the process has been difficult. I’m trying to add first_name, last_name, gender, and pictureUrl along with the already provided email. I didn’t think it would be that complicated. Can you tell me if I did anything wrong. full graphcool server repo here

I’ve changed the FacebookUser interface to accommodate the new fields

interface FacebookUser {
id: string
email: string | null
first_name: string | null
last_name: string | null
gender: string | null
picture: any | null

i’ve changed the endpoints to call for additional data in getFacebookUser:

const endpoint = "${facebookToken}"

and I customized createGraphcoolUser like so

async function createGraphcoolUser(api: GraphQLClient, facebookUser: FacebookUser): Promise {
const mutation = …
const variables = {
firstName: facebookUser.first_name,
lastName: facebookUser.last_name,
gender: facebookUser.gender,

return api.request<{ createUser: User }>(mutation, variables)
    .then(r =>



the profile picture url was the problem