Skip to content

Instantly share code, notes, and snippets.

@canertuzunar
Created April 14, 2021 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save canertuzunar/46e4a735cea78e7e7e1d3da197fa576b to your computer and use it in GitHub Desktop.
Save canertuzunar/46e4a735cea78e7e7e1d3da197fa576b to your computer and use it in GitHub Desktop.
# Ornek bir query ile nasil calistigini anlayalim. Ilk oncelikle src klasoru altinda
# posts diye bir klasor olusturalim ardindan localhost:8000/__graphql adresine gidelim
# "query MyQuery" taginin icini temizleyelim ve ardindan su sorguyu girelim
query MyQuery {
allDirectory(filter: {absolutePath: {regex: "/src/"}}) {
edges {
node {
name
}
}
}
}
# Sonuc Soyle olacaktir
{
"data": {
"allDirectory": {
"edges": [
{
"node": {
"name": "posts"
}
}
]
}
},
"extensions": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment