0

I'm an experienced developer, but rather new to GraphQL. I use this Neo4j-Tutorial as a basis for orientation and am developing in typescript (backend and frontend).

Can anyone tell me how to somehow rename the generated Endpoints from @neo4j/graphql? The corresponding docs don't help with that.

I use the following GraphQL-Schema for demonstration (it's german: "Person" means "person" and "Tier" means "animal"):

type Person {
  name: String
}

type Tier {
  name: String
}

I process the schema using the gql-Function (from apollo-server) first, the result of that does look OK.

Afterwards, when I call const neoSchema = new Neo4jGraphQL({ typeDefs, driver: drv }) (with drv being my Neo4j-Driver) the resulting neoSchema.schema shows up some unexpected naming in the generated endpoints, e.g.:

    CreatePeopleMutationResponse: CreatePeopleMutationResponse,
    UpdatePeopleMutationResponse: UpdatePeopleMutationResponse,

Somehow the german "Person" (plural being "Personen") got implicitly translated to "people". I can also think of some "false friends" where this effect is even worse.

Well, the API should be in my own language (following DDD), so that's a smell I want to rename also having the api-users and generated clients in mind. How is that possible?

Thank you!

0 Answers0