Accessing Authenticated User Data

Last edit:  Apr 19, 2019

Contributors:  Slashek pavelloz lemingos diana-lakatos

This guide will help you access information of authenticated users.


To follow the steps in this tutorial, you should be familiar with the required directory structure for your codebase, and understand the concepts of pages and users, and GraphQL. To have information stored of authenticated users that you can access, make sure you have followed the previous tutorials in the Get Started/Users section.


Accessing authenticated user data is a two-step process:

Step 1: Create GraphQL query


  current_user {
    developer_profile: profile(profile_type: "developer") {
    client_profile: profile(profile_type: "client") {

Step 2: Fetch information from GraphQL file

On any given page (including layout itself, but be careful with adding queries to the layout), you can add this liquid tag:

{% graphql g = 'current_user' %}

This tag fetches information defined in the GraphQL file for the currently logged in user and stores it in a variable named g. The returned data is a standard hash, so you can even display it via {{ g }}.

Next steps

Congratulations! You know how to access information of authenticated users. Now you can learn about sending an Email Notification to a newly signed up user:


We are always happy to help with any questions you may have. Check out our Help page, or contact us.