© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
3 replies
lewisd

Weird TS error, 'ParserErrorUnexpected input )'

Hi guys, my function to fetch some data from supabase looks like so:
  const initOrder = useCallback(async (id: string) => {
    const {data, error} = await supabase
      .from(ORDERS_TABLE)
      .select(
        '*,attachments:orderAttachments(*),lineItems:orderLineItems(*,lineItem:lineItems(*)),sellerData:userData!sellerId(*),buyerData:userData!buyerId(*),listing:listings(*),kudosGiven:kudosGivenFromOrders(*))',
      )
      .match({
        id,
      })
      .single();
    if (error) {
      //handle error
    }
    if (data) {
      setOrder(data);
    }
    setLoading(LOADING_STATE.IDLE);
  }, []);
  const initOrder = useCallback(async (id: string) => {
    const {data, error} = await supabase
      .from(ORDERS_TABLE)
      .select(
        '*,attachments:orderAttachments(*),lineItems:orderLineItems(*,lineItem:lineItems(*)),sellerData:userData!sellerId(*),buyerData:userData!buyerId(*),listing:listings(*),kudosGiven:kudosGivenFromOrders(*))',
      )
      .match({
        id,
      })
      .single();
    if (error) {
      //handle error
    }
    if (data) {
      setOrder(data);
    }
    setLoading(LOADING_STATE.IDLE);
  }, []);


I get an error on the
setOrder(data)
setOrder(data)
line. See the attached image.

Does anyone see anything wrong with my query string?
Screenshot_2022-10-03_at_10.11.14.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

ts error in code
SupabaseSSupabase / help-and-questions
2mo ago
realtime subscription error - TS
SupabaseSSupabase / help-and-questions
3y ago
Supabase DB ts typos error
SupabaseSSupabase / help-and-questions
6mo ago
Error invalid input syntax for type bigint
SupabaseSSupabase / help-and-questions
4y ago