Graphql Error on Generating Neo4j Subgraph Schema with Autogenerated Interface and Type

I have a graphql interface like this

interface Verifiable {
    verifications: [Verification!]!
}

I then implement that interface like this:

type Address implements Verifiable  @node(labels: ["Address", "Verifiable"]) @key(fields:"id"){
  id: ID! @id
  street: String
  suburb: String
  city: String
  stateProvince: String
  country: String
  verifications: [Verification!]! @relationship(type: "VERIFIED", direction: OUT)
}

On running the project, I am getting this error:

Apr-12-2023 21:16:52    error   GQL API        The schema is not a valid GraphQL schema.. Caused by:
[<unnamed>] Interface field VerifiableEventPayload.verifications expected but AddressEventPayload does not provide it.

GraphQL request:582:3
581 | interface VerifiableEventPayload {
582 |   verifications: [Verification!]!
    |   ^
583 | }

GraphQL request:712:1
711 |
712 | type AddressEventPayload implements VerifiableEventPayload {
    | ^
713 |   id: ID!

I have not defined interface VerifiableEventPayload and type AddressEventPayload, these seem autogenerated. I am implementing my graphql server with apollo server v4. The error however occurs at getting the neo4j schema before I instantiate the apollo server.

My package.json dependencies:

"dependencies": {
    "@apollo/server": "^4.5.0",
    "@apollo/subgraph": "^2.3.4",
    "@escape.tech/graphql-armor": "1.8.1",
    "@graphql-tools/load": "^7.8.13",
    "@graphql-tools/load-files": "^6.6.1",
    "@graphql-tools/merge": "^8.4.0",
    "@graphql-tools/schema": "^9.0.17",
    "@graphql-tools/utils": "^9.2.1",
    "@neo4j/cypher-builder": "^0.2.1",
    "@neo4j/graphql": "^3.17.1",
    "@neo4j/graphql-ogm": "^3.17.1",
    "@neo4j/graphql-plugin-auth": "^2.1.0",
    "@neo4j/introspector": "^1.0.3",
    "bcrypt": "^5.1.0",
    "cookie-parser": "^1.4.6",
    "cors": "^2.8.5",
    "dotenv": "^16.0.3",
    "express": "^4.18.2",
    "graphql": "^16.6.0",
    "graphql-tag": "^2.12.6",
    "jsonwebtoken": "^9.0.0",
    "lodash": "^4.17.21",
    "neo4j-driver": "^5.6.0",
    "nodemailer": "^6.9.1",
    "winston": "^3.8.2"
  }

Any ideas what i am getting wrong?

Thanks in advance.

Hi @ltmutiwekuziwa! Your type definitions look correct and I've not been able to recreate the issue you are seeing using them.

The event payload types are generated as part of the @neo4j/graphql subscriptions plugin. Are you using that? If so make sure you have followed the guide here correctly: Getting Started with Subscriptions - Neo4j GraphQL Library.

Without anymore context such your full type defs and the code you are using to init the library and get your subgraph schema, I'm afraid I can't be anymore help

Hi @LiamDoodson. Apologies for the late response. Was off on a mini holiday. Let me try your suggestion and revert back

I have noticed that I have issues when I have interfaces that implement other interfaces or types that implement multiple interface but if I implement a single interface on a type, the server starts without error. The code for instantiating Neo4jGraphql is as follows:

const neo4jGraphql = new Neo4jGraphQL({
    typeDefs,
    driver,
    resolvers,
    config:{
        driverConfig:{
            database: process.env.NEO4J_DATABASE
        },
    },
    plugins:{
        subscriptions: new Neo4jGraphQLSubscriptionsSingleInstancePlugin(),
		auth: new Neo4jGraphQLAuthJWTPlugin({
			secret: keyPublic,
            globalAuthentication: false,
		}),
    }
});

Unfortunately, we don't currently support interfaces, implementing interfaces or implementing multiple interfaces. However, we are currently working on improving our interface support and these are both features that are being considered