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] No id field defined!

See original GitHub issue

I’m encontering this issue when instropecting a prisma1 schema on Postgres, please see Report Id 1416.

Version

prisma2@2.0.0-alpha.648, binary version: 43dc93afaf4961d9a083741b3cdbd379748389d6

Error

Schema parsing
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "No id field defined! Model: PrimaryMeetAndGreetOperatorOnAirport"', src/libcore/result.rs:1165:5
stack backtrace:

This is the model being referenced

model PrimaryMeetAndGreetOperatorOnAirport {
  A Airport              @relation("AirportTo_PrimaryMeetAndGreetOperatorOnAirport")
  B MeetAndGreetOperator @relation("MeetAndGreetOperatorTo_PrimaryMeetAndGreetOperatorOnAirport")

  @@map("_PrimaryMeetAndGreetOperatorOnAirport")
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
williamluke4commented, Feb 19, 2020

As this is now a separate issue I think we can close this and Ill create another 😃

1reaction
williamluke4commented, Feb 19, 2020

Version: prisma2@2.0.0-alpha.798, binary version: d20d1e6b1525ae45e3cc39784ad16c97d463f61c

  1. prisma2 introspect Works
  2. prisma2 generate Works
  3. prisma2 migrate save --experimental Works
  4. prisma2 migrate up --experimental ⚠️ There will be data loss
⚠️  There will be data loss:

  • You are about to alter the column `operator` on the `FlightCharterOperatorYear` table, which still contains 4 non-null values. The data in that column will be lost.
  • You are about to alter the column `operator` on the `FlightOperatorYear` table, which still contains 9 non-null values. The data in that column will be lost.
  • You are about to alter the column `season` on the `FlightRoute` table, which still contains 124 non-null values. The data in that column will be lost.
  • You are about to alter the column `chatRoom` on the `Message` table, which still contains 47 non-null values. The data in that column will be lost.
  • You are about to alter the column `sentBy` on the `Message` table, which still contains 47 non-null values. The data in that column will be lost.
  • You are about to alter the column `operator` on the `Plane` table, which still contains 3 non-null values. The data in that column will be lost.
  • You are about to alter the column `quoteProperty` on the `QuoteAccommodation` table, which still contains 34 non-null values. The data in that column will be lost.
  • You are about to alter the column `quote` on the `QuoteCustomItem` table, which still contains 17 non-null values. The data in that column will be lost.
  • You are about to alter the column `type` on the `QuoteCustomItem` table, which still contains 17 non-null values. The data in that column will be lost.
  • You are about to alter the column `rateGroup` on the `RateGroupOverride` table, which still contains 21 non-null values. The data in that column will be lost.
  • You are about to alter the column `season` on the `RateGroupOverride` table, which still contains 21 non-null values. The data in that column will be lost.
  • You are about to alter the column `country` on the `Region` table, which still contains 2780 non-null values. The data in that column will be lost.
  • You are about to alter the column `transfer` on the `TransferRate` table, which still contains 30 non-null values. The data in that column will be lost.
  • You are about to alter the column `paymentStatus` on the `Trip` table, which still contains 10 non-null values. The data in that column will be lost.
  • You are about to alter the column `status` on the `Trip` table, which still contains 10 non-null values. The data in that column will be lost.
  • You are about to alter the column `userType` on the `User` table, which still contains 93 non-null values. The data in that column will be lost.
  • You are about to drop the table `_DateRangeToFlightOperatorSeason`, which is not empty (24 rows).
  • You are about to drop the table `_DateRangeToPropertySeason`, which is not empty (1077 rows).
  • You are about to drop the table `_DateRangeToPropertySpecial`, which is not empty (3 rows).
  • You are about to drop the table `_FlightCharterRateToPlane`, which is not empty (2 rows).
  • You are about to drop the table `_FlightRouteToQuoteFlightRoute`, which is not empty (11 rows).
  • You are about to drop the table `_GPSCoordToPropertyAccess`, which is not empty (211 rows).
  • You are about to drop the table `_InsuranceCompanyToUserTravelInfo`, which is not empty (9 rows).
  • You are about to drop the table `_MeetAndGreetOperatorRateToQuoteArrivalDeparture`, which is not empty (2 rows).
  • You are about to drop the table `_PrimaryMeetAndGreetOperatorOnAirport`, which is not empty (1 rows).
  • You are about to drop the table `Property_exclusions`, which is not empty (110 rows).
  • You are about to drop the table `PropertyExtra_notes`, which is not empty (2 rows).
  • You are about to drop the table `_PropertyInclusionBasicToPropertyRateGroup`, which is not empty (854 rows).
  • You are about to drop the table `_PropertyInclusionDrinkToPropertyRateGroup`, which is not empty (854 rows).
  • You are about to drop the table `Property_inclusions`, which is not empty (147 rows).
  • You are about to drop the table `_PropertyPackageRateGroupToPropertyRateGroup`, which is not empty (630 rows).
  • You are about to drop the table `_PropertyPackageRateGroupToRoomUnitCost`, which is not empty (599 rows).
  • You are about to drop the table `_PropertyPageOnProperty`, which is not empty (4 rows).
  • You are about to drop the table `_PropertyRateGroupToRoomRate`, which is not empty (2772 rows).
  • You are about to drop the table `_PropertySeasonToQuoteAccommodation`, which is not empty (33 rows).
  • You are about to drop the table `_PropertySeasonToRoomRate`, which is not empty (2744 rows).
  • You are about to drop the table `_PropertySeasonToRoomUnitCost`, which is not empty (493 rows).
  • You are about to drop the table `PropertySpecial_notes`, which is not empty (1 rows).
  • You are about to drop the table `_PropertyToPropertyAccess`, which is not empty (201 rows).
  • You are about to drop the table `QuoteAccommodation_notes`, which is not empty (1 rows).
  • You are about to drop the table `_QuoteAccommodationPaxToRoomRate`, which is not empty (40 rows).
  • You are about to drop the table `_QuoteAccommodationToRoom`, which is not empty (34 rows).
  • You are about to drop the table `_QuoteTransferToTransferRate`, which is not empty (18 rows).
  • You are about to drop the table `_TransferRateToTransferVehicle`, which is not empty (30 rows).
  • You are about to drop the table `_UserOnUserAuth`, which is not empty (11 rows).
  • You are about to drop the table `_UserOnUserBasicInfo`, which is not empty (93 rows).
  • You are about to drop the table `_UserOnUserTravelInfo`, which is not empty (18 rows).
Read more comments on GitHub >

github_iconTop Results From Across the Web

Introspection - GraphQL
id looks a bit weird there, it has no name for the type. That's because it's a "wrapper" type of kind NON_NULL ....
Read more >
What is introspection? (Reference) - Prisma
Introspection lists model fields in the same order as the corresponding table columns in the database. Order of attributes. Introspection adds attributes in...
Read more >
Introspection: Definition, Uses, Examples, and Tips
Introspection is a psychological process that involves looking inward to examine one's own thoughts, emotions, judgments, and perceptions. In ...
Read more >
Apollo Federation subgraph specification
Automatically extend its schema with all definitions listed in Subgraph schema additions; Correctly resolve the Query._service enhanced introspection field ...
Read more >
graphql Error: Introspection must provide input type for ...
Error: Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was ...
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