Skip to content

Make me graphql query an option.#3

Open
wnm wants to merge 2 commits intorob-race:mainfrom
wnm:more_me_attributes
Open

Make me graphql query an option.#3
wnm wants to merge 2 commits intorob-race:mainfrom
wnm:more_me_attributes

Conversation

@wnm
Copy link

@wnm wnm commented Jun 21, 2024

Per default it will use this query:

query {
  me {
    email
    name
    id
  }
}

But you can overwrite the default to query whatever fields you wish:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :monday,
    Rails.application.credentials.monday_api_key,
    Rails.application.credentials.monday_api_secret,
    {
      scope: "me:read workspaces:read workspaces:write boards:read boards:write",
      query: <<~GRAPHQL
        query {
          me {
            account{
              slug
              name
            }
            birthday
            country_code
            created_at
            current_language
            join_date
            email
            enabled
            id
            is_admin
            is_guest
            is_pending
            is_verified
            is_view_only
            last_activity
            location
            mobile_phone
            name
            phone
            photo_original
            photo_small
            photo_thumb
            photo_thumb_small
            photo_tiny
            sign_up_product_kind
            time_zone_identifier
            title
            url
            utc_hours_diff
          }
        }
      GRAPHQL
    }
end

Query all fields from https://developer.monday.com/api-reference/reference/me#fields

@wnm wnm changed the title Add more attributes to me query Make me graphql query an option. Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant