Solved

Apollo Database Graphql Search

  • 22 November 2023
  • 5 replies
  • 52 views

Userlevel 1

Hello, I’m look for a solution similar to the query findCard bellow, but to get IDs from records in apollo databases. Is there a way to get the ID passing as parameters like fields and fields values?

 

    query GetCardIdByFieldValue($pipeId: ID!, $fieldId: String!, $fieldValue: String!) {

        findCards(

            pipeId: $pipeId

            search: {

                fieldId: $fieldId,

                fieldValue: $fieldValue

            }

        ) {

            edges {

                node {

                    id

                }

            }

        }

    }

icon

Best answer by Lais Laudari 23 November 2023, 21:59

View original

5 replies

Userlevel 7

Hi @Christian Nunes!
You can get it through this query:

{
  table_records(table_id: ID) {
    edges {
      node {
        id
        title
        done
        table {
          id
        }
        created_at
        created_by {
          id
        }
      }
    }
  }
}

Userlevel 1

Hi @Christian Nunes!
You can get it through this query:

{
  table_records(table_id: ID) {
    edges {
      node {
        id
        title
        done
        table {
          id
        }
        created_at
        created_by {
          id
        }
      }
    }
  }
}

Thank you @Lais Laudari , but that won't do. My bad if I did’t made clear: I need avoid run across all database recrods, due the nature of the process. That's way a I need a solution close to "findCard shearch"

Userlevel 7

I got it!

query{
  findRecords(tableId:"xxxx", first: 50, search:{fieldId:"xxx", fieldValue:"xxxx"}){
    edges{
      node{
        title
        id
      }
    }
  }
}
 

Userlevel 1

I got it!

query{
  findRecords(tableId:"xxxx", first: 50, search:{fieldId:"xxx", fieldValue:"xxxx"}){
    edges{
      node{
        title
        id
      }
    }
  }
}
 

Thank you @Lais Laudari, that’s works for me!

Userlevel 7

Great @Christian Nunes!
You are welcome😀

Reply