Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: New RPCs #87

Merged
merged 1 commit into from
Jan 6, 2024
Merged

feat: New RPCs #87

merged 1 commit into from
Jan 6, 2024

Conversation

kevinmichaelchen
Copy link
Owner

@kevinmichaelchen kevinmichaelchen commented Jan 6, 2024

Add RPCs to prepare for #83.

  • 3 new Get RPCs
  • 3 new List RPCs

Tailcall experiment

Tried to use Tailcall, but it couldn't load or parse the proto file — maybe because of the imports (e.g., validate.proto).

schema
  # Specify server configuration: Start tailcall server at 0.0.0.0:8000 and enable GraphiQL playground
  @server(port: 8000, graphiql: true)
  # Specify a base url for all http requests
  @upstream(baseURL: "http://localhost:3000") {
  query: Query
}

type Query {
  org(input: GetOrgRequest!): GetOrgResponse
    @grpc(
      baseURL: "http://localhost:9091"
      service: "OrgService"
      method: "GetOrg"
      protoPath: "./idl/orgapis/org/v1beta1/api.proto"
      body: "{{args.input}}"
    )
}

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

type GetOrgRequest {
  id: String!
}

type GetOrgResponse {
  org: Org!
}

Sources

@kevinmichaelchen kevinmichaelchen merged commit 8f9a0a9 into main Jan 6, 2024
4 checks passed
@kevinmichaelchen kevinmichaelchen deleted the graphql-api branch January 6, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant