Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with hasura relay api #314

Closed
erik-seifert opened this issue Oct 18, 2023 · 5 comments
Closed

Problems with hasura relay api #314

erik-seifert opened this issue Oct 18, 2023 · 5 comments

Comments

@erik-seifert
Copy link

I try to call hasura relay api endpoint and get the following error.

GraphQLError(message: field 'event_connection' not found in type: 'query_root', locations: null, path: null, extensions: {path: $.selectionSet.event_connection, code: validation-failed})

Query:

query GetEvent {
  event_connection {
    edges {
      cursor,
      node {
        title
        created_at
        description
      }
    }
  }
}

But is see in schema

type query_root {
 ....
  """
  fetch data from the table: "event"
  """
  event_connection(
    after: String
    before: String

    """distinct select on columns"""
    distinct_on: [event_select_column!]
    first: Int
    last: Int

    """sort the rows by one or more columns"""
    order_by: [event_order_by!]

    """filter the rows returned"""
    where: event_bool_exp
  ): eventConnection!
 ....
}
@github-actions
Copy link

👋 @erik-seifert
Thank you for raising an issue. I will investigate the issue and get back to you as soon as possible.
Please make sure you have provided enough context.

This library is created and maintained by me, @budde377. Please consider supporting my work and ensure our survival by donating here.

@budde377
Copy link
Contributor

This looks like a runtime error, so it would seem that your endpoint doesn't agree with the schema. It doesn't look like an error in the code generator

@erik-seifert
Copy link
Author

If i try to call this query directly on (on graphql explorer) everything works like expected.

@erik-seifert
Copy link
Author

Do not work to late. Found it. Thx for your help.

@erik-seifert
Copy link
Author

And thanks for the great library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants