- Run
npx degit grafbase/grafbase/examples/swift grafbase-with-swiftto clone this example - Change directory into the new folder
cd grafbase-with-swift - Run
npx grafbase@latest devin your terminal and go tohttp://localhost:4000 - Populate the backend with some
Postentries using a GraphQL mutation:
mutation {
postCreate(
input: {
title: "Swift + GraphQL!"
body: "Hello from Grafbase."
comments: [
{ create: { message: "GraphQL is awesome!" }
{ create: { message: "Another comment from Grafbase" } }
]
}
) {
post {
id
}
}
}- Open the project
Grafbase Swift.xcodeprojwith XCode - Run the app!
To learn more about Grafbase, take a look at the following resources:
- Grafbase - learn about Grafbase features and API.
To learn more about Swift, take a look at the following resources: