Schema error

Hi,

The following is my schema that i am testing with

type Contact {
    id: ID!
    sessionId: String! @id @search(by: [exact])
    ani: String @search(by: [hash])
    dnis: String @search(by: [hash])
    crmAccountId: String @search(by: [hash])
    agentId: String @search(by: [hash])
    lang: String @search(by: [hash])
    startTime: Int64 @search
    endTime: Int64 @search
    State: String @search(by: [hash])
    i_ts: Int64 @search
    tenantId: String! (by: [hash])
    turns: [Turn] @hasInverse(field: transcript)
}

type Sentance {
    id: ID!
    turnId: Int!
	speaker: String!
	start: Int64
	end: Int64
	text: String
	sValue: Float
    cat: String
    confidence: Int
    transcript: Transcript
}

when i try to load this, i am getting a cryptic error:

curl -X POST localhost:8080/admin/schema --data-binary '@schema.gql'
{"errors":[{"message":"resolving updateGQLSchema failed because input:13: Expected Name, found (\n (Locations: [{Line: 3, Column: 4}])","extensions":{"code":"Error"}}]}

Can you tell me what i am doing wrong here?

Line 13 as the error indicates…

tenantId: String! (by: [hash])

Should be

tenantId: String! @search(by: [hash])
2 Likes