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.

[Introspection] Panic: Unable to resolve scalar field / @@unique does not work with non-scalar fields

See original GitHub issue

Introspection error message might look like:

Schema parsing
thread 'main' panicked at 'Unable to resolve scalar field 'A'', src/libcore/option.rs:1185:5
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   ...

Example schema where it happens: https://github.com/prisma/database-schema-examples/blob/master/mysql/sakila/schema.sql

image

Introspection Analysis Pattern Description:

Panic: Model (probably) has a @@id or @@unique, that refers to a non-scalar field. This usually happens in table inheritance and join tables without IDs.

More details in the internal introspection analysis repository, look for the known pattern: panic-unable-to-resolve-scalar-field


This problem can also appear if you write your schema by hand or used introspection to create it before: https://github.com/prisma/prisma2/issues/1534

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

6reactions
janpiocommented, Feb 18, 2020

This is now fixed ❤️

1reaction
ssalbdivadcommented, Feb 18, 2020

@janpio @tomhoule Thanks so much :bowtie:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Filter on non-scalar fields or relations (Types) - GraphQL
Query with @filter on a list/non-scalar objects at root level ... I have tried thinking of how a filter directive might solve the...
Read more >
FlatBuffers: Tutorial - Google
We will step through a simple example application, which shows you how to: Write a FlatBuffer schema file. Use the flatc FlatBuffer compiler....
Read more >
Why Do I Get This Error for This Non-scalar Structure?
All of the field data concatenated together, or places into another container array (e.g. a cell array), or something else? So far you...
Read more >
linear hyperbolic equations: Topics by Science.gov
Extended Thermodynamics: a Theory of Symmetric Hyperbolic Field Equations ... This model can contribute significantly to solve the nonlinear problem and at ...
Read more >
Quantum Simulation of Spin-1 Physics with Bosons in ... - MIT RLE
notion of a non-scalar polarizability at a more intuitive level. This chapter is helpful for understanding how a state-dependent optical lattice works.
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