这是indexloc提供的服务,不要输入任何密码
Skip to content

[Bug] gql schema of root query function that returns a single row shows a list as return type. #7109

@ghry5

Description

@ghry5

I followed #4299 to create a sql function which returns only a single row. It works great but since the schema still lists the return type as [user!]!, graphql codegen is generating incorrect types.

I created a me query via a sql function of the form:

CREATE OR REPLACE FUNCTION public.me(hasura_session json) 
RETURNS "user" LANGUAGE sql STABLE AS 
$function$
SELECT
  *
FROM
  "public"."user" u
where
  u.id =(hasura_session ->> 'x-hasura-user-id') :: uuid
$function$

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    k/bugSomething isn't workingp/highcandidate for being included in the upcoming sprint

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions