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

Create new decl specific endpoints and wire them to the console decl pages #2875

Closed
wesbillman opened this issue Sep 27, 2024 · 2 comments
Closed
Assignees
Labels
console Web console dx

Comments

@wesbillman
Copy link
Collaborator

We currently build the entire module tree and pages from either PullSchema or GetModules we should create dedicated types and requests for our console needs as part of our console BFF.

We already have a few types like this, so we'll likely just need to add the additional decl types we show on the console.

message Module {
  string name = 1;
  string deployment_key = 2;
  string language = 3;
  string schema = 4;
  repeated Verb verbs = 5;
  repeated Data data = 6;
  repeated Secret secrets = 7;
  repeated Config configs = 8;
}

message Verb {
  schema.Verb verb = 1;
  string schema = 2;
  string json_request_schema = 3;
}

message Data {
  schema.Data data = 1;
  string schema = 2;
}

message Secret {
  schema.Secret secret = 1;
}

message Config {
  schema.Config config = 1;
}

// Add other decls

We'll also want dedicated requests for each of these:

service ConsoleService {
  // some existing stuff...

  rpc GetModule(GetModuleRequest) returns (Module);
  rpc GetVerb(GetVerbRequest) returns (Verb);
  rpc GetData(GetDataRequest) returns (Data);
  rpc GetSecret(GetSecretRequest) returns (Secret);
  rpc GetConfig(GetConfigRequest) returns (Config);

// Add other decls
}

Then we can create dedicated use<Delc>() hooks in our api package to be used by the <Decl>Page.tsx components.

@wesbillman wesbillman added console Web console dx labels Sep 27, 2024
This was referenced Sep 27, 2024
@deniseli
Copy link
Contributor

reminder: test loading time / impact with GetVerb

@deniseli
Copy link
Contributor

not completed, just change a plans :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Web console dx
Projects
None yet
Development

No branches or pull requests

2 participants