GraphQL and password type

Hi @johannes, yes this is for the encrypted field you may want to have in the data.

Schema looks like:

type Author @secret(field: "pwd") {
	name: String! @id
	token: String
}

Mutation like:

mutation {
  addAuthor(input:[{name:"myname", pwd:"mypassword"}]){
    author {
      name
    }
  }
}

Query like (GraphQL± query, I would need to find if there is a corresponding GraphQL query):

query {
  foo(func: eq(Author.name, "myname")){
    Author.name
    checkpwd(Author.pwd, "mypassword")
  }
}

This is quite similar to what we have in GraphQL±.

6 Likes