Single Line Text Field

Sample Single Line Query

Query

{
shops {
title
}
}

Output

{
"data": {
"shops": [
{
"title": "Happy Valley Coffee"
}
]
}
}

Filtering by Single Line

Single Line filters support:

  • _not
  • _in
  • _not_in
  • _contains
  • _not_contains
  • _starts_with
  • _not_starts_with
  • _ends_with
  • _not_ends_with

title: String

{
shops(where: { title: "Happy Valley Coffee" }) {
title
}
}

title_not: String

{
shops(where: { title_not: "Happy Mountain Coffee" }) {
title
}
}

title_in: [String!]

{
shops(where: { title_in: ["Happy Valley Coffee"] }) {
title
}
}

title_not_in: [String!]

{
shops(where: { title_not_in: ["Happy Mountain Coffee"] }) {
title
}
}

title_contains: String

{
shops(where: { title_contains: "Coffee" }) {
title
}
}

title_not_contains: String

{
shops(where: { title_not_contains: "Mountain" }) {
title
}
}

title_starts_with: String

{
shops(where: { title_starts_with: "Happy" }) {
title
}
}

title_not_starts_with: String

{
shops(where: { title_not_starts_with: "Valley" }) {
title
}
}

title_ends_with: String

{
shops(where: { title_ends_with: "Coffee" }) {
title
}
}

title_not_ends_with: String

{
shops(where: { title_ends_with: "Tea" }) {
title
}
}

Mutating a Single Line

Mutation

mutation {
createShop(data: { title: "Happy Mountain Tea" }) {
title
}
}

Output

{
"data": {
"createShop": {
"title": "Happy Mountain Tea"
}
}
}

This site uses cookies to provide you with a better user experience. For more information, refer to our Privacy Policy