How to get data of specific board with all fields?

I’m trying to get data of a specific board. I want data of all fields but as per my understanding I have to add item’s field name.
But when I’m trying the below query, I’m facing error
query-> {
“query”: “query { boards(ids: [1821199498]) { items { id name email phone} }}”
}

error-> “message”: “Field ‘phone’ doesn’t exist on type ‘Item’”

first, boards{items} is deprecated, you need to use Items Page to retrieve items from a board (in API 2023-10 which will be the minimum supported version starting 15 Jan 2024).

Column values are not individual fields on the item, they are rather entities retrieved in the column_values query on the item.

The query below, will return the column_values specified by ID - if no ID is specified then all columns are returned. (See board,item,column IDs for how to find them in the UI if specifying directly, and see the API documentation for how to query a board for its column IDs, or send the column ID in a webhook or app action block.)

query {
  boards (ids: 1234567890){
    items_page (limit: 100) {
      cursor
      items {
        id 
        name 
        column_values(ids: [columnIDs]) {
             id,type,text,value
        }
      }
    }
  }
}
query {
  boards (ids: 1234567890){
    items_page (limit: 100) {
      cursor
      items {
        id 
        name 
        column_values {
             id,type,text,value
        }
      }
    }
  }
}

@codyfrisch Thanks for reply
But still don’t get what I want.
I need the query which gives me all the records with all the field values ​​of Board (ID:1821199498)

Then use the second query. This will return the first 100 items, with all of the column values (except mirror/formula columns, mirror columns you can find details in the documentation). If you want to get the next 100 (or up to 500, the max limit you can set) use the cursor based pagination

If you want OTHER non-column value fields then specify those per the Items documentation, you can see the field names there.

In your initial example you specified fields that do not exist - that’s why it failed. phone is not a field on an item. It would be referencing a column so you must specify column_values{} to return it. Email is a field on an item and is the email address used to send updates to the item by email - it is not a column named Email, which is returned under column_values.

I won’t type a query with every Item field listed, they are all listed in the documentation I linked to for Items - so reference that. experiment in the playground, it has the schema built in to help see all of the fields and arguments. API Playground