Typing of data for useQuery when placeholder data is set? #9829
              
                
                  
                  
                    Answered
                  
                  by
                    TkDodo
                  
              
          
                  
                    
                      miccoh1994
                    
                  
                
                  asked this question in
                Q&A
              
            -
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            TkDodo
          
      
      
        Nov 1, 2025 
      
    
    Replies: 1 comment
-
| 
         I think I answered this on discord, but this is on purpose, as data is undefined when the query errors when you use  https://tkdodo.eu/blog/placeholder-and-initial-data-in-react-query  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        miccoh1994
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    

I think I answered this on discord, but this is on purpose, as data is undefined when the query errors when you use
placeholderData:https://tkdodo.eu/blog/placeholder-and-initial-data-in-react-query