Skip to content

Commit

Permalink
refactor: Use multiple Tailcall GraphQL files
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmichaelchen committed Jan 14, 2024
1 parent 8f6f711 commit 80ef2c1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
22 changes: 22 additions & 0 deletions tailcall/org.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

type Org {
id: ID!
name: String!
}

input GetOrgRequest {
id: String!
}

type GetOrgResponse {
org: Org!
}

input CreateOrgInput {
id: ID!
name: String!
}

type CreateOrgResponse {
org: Org!
}
29 changes: 6 additions & 23 deletions tailcall.graphql → tailcall/server.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ schema
# Specify server configuration.
# Start tailcall server at 0.0.0.0:8000
# Enable GraphiQL playground
@server(port: 8000, graphiql: true)
@server(
port: 8000
graphiql: true
queryValidation: true
)

# Specify a base url for all HTTP requests.
@upstream(timeout: 5) {
query: Query
mutation: Mutation
}


type Query {
org(id: ID!): GetOrgResponse!
@http(
Expand All @@ -27,25 +32,3 @@ type Mutation {
body: "{{args.input}}"
)
}

type Org {
id: ID!
name: String!
}

input GetOrgRequest {
id: String!
}

type GetOrgResponse {
org: Org!
}

input CreateOrgInput {
id: ID!
name: String!
}

type CreateOrgResponse {
org: Org!
}

0 comments on commit 80ef2c1

Please sign in to comment.