Graphql how can i replace the required (id: ID!) field with a (slug: String)

// api/post/config/schema.graphql.js

module.exports = {
  query: "postBySlug(slug: String!): Post",
  resolver: {
    Query: {
      postBySlug: {
        description: "Return post with given slug",
        resolver: 'application::post.post.findOne'
      },
    },
  },
};