question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Introspect queries produces an error

See original GitHub issue

Introspecting queries is quite limited at the moment. See discussion

SELECT INTROSPECT
.......   typeof (select shop::Category{id, description} LIMIT 1);
error: cannot introspect transient type variant
  ┌─ query:2:3
  │
2 │   typeof (select shop::Category{id, description} LIMIT 1);
  │   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error

The ability to introspect a query might come in very handy for multiple use cases like generating language specific types for a queries. Typescript for example.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
1st1commented, Jan 5, 2021

FWIW it’s possible to introspect the exact return type of any query via preparing it at the protocol level. Our JS driver has some private APIs to do that.

0reactions
1st1commented, Oct 22, 2021

We should later discuss if we even want to support INTROSPECT TYPEOF on arbitrary selects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix error message for introspect queries when output arg is ...
We're trying to get basic graphql introspection working and have been unable to get anything to work on a variety of public and...
Read more >
Apollo-codegen introspection throws error - Stack Overflow
I have been working with apollo-codegen to introspect my schema in a proyect without problem and from one moment to ...
Read more >
Learn Sangria
This code will produce status code 400 in case of any error caused by client (query validation, invalid operation name, error in query...
Read more >
Utilities — GraphQL-core 3 3.3.0a2 documentation
Given the result of a client running the introspection query, creates and returns a GraphQLSchema instance which can be then used with all...
Read more >
Azure: Introspector attempts to look into other databases that ...
Azure: Introspector attempts to look into other databases that causes errors "Azure Limitation: [S0001][40515] Reference to database and/or server name in ' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found