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

admin server #50

Merged
merged 2 commits into from Feb 19, 2024
Merged

admin server #50

merged 2 commits into from Feb 19, 2024

Conversation

hopeyen
Copy link
Collaborator

@hopeyen hopeyen commented Feb 17, 2024

Description

Separate admin server alongside file-service

  • admin host and port config
  • admin token config with Bearer prefix
  • query functions are the same as status query exposed
  • mutation functions are addBundle(hash, location), addBundles(hashs, locations), removeBundle(hash), removeBundles(hashs)
schema {
  query: StatusQuery
  mutation: StatusMutation
}

type GraphQlBundle {
  ipfsHash: String!
  manifest: GraphQlBundleManifest!
  fileManifests: [GraphQlFileManifestMeta!]!
}

type GraphQlBundleManifest {
  files: [GraphQlFileMetaInfo!]!
  fileType: String!
  specVersion: String!
  description: String!
  chainId: String!
}

type GraphQlFileManifest {
  totalBytes: Int!
  chunkSize: Int!
  chunkHashes: [String!]!
}

type GraphQlFileManifestMeta {
  metaInfo: GraphQlFileMetaInfo!
  fileManifest: GraphQlFileManifest!
}

type GraphQlFileMetaInfo {
  name: String!
  hash: String!
}

type StatusMutation {
  addBundle(deployment: String!, location: String!): GraphQlBundle!
  addBundles(deployments: [String!]!, locations: [String!]!): [GraphQlBundle!]!
  removeBundle(deployment: String!): GraphQlBundle
  removeBundles(deployments: [String!]!): [GraphQlBundle!]!
}

type StatusQuery {
  files(deployments: [String!]): [GraphQlFileManifest!]!
  file(deployment: String!): GraphQlFileManifest
  bundles(deployments: [String!]): [GraphQlBundle!]!
  bundle(deployment: String!): GraphQlBundle
}

Issue link (if applicable)

#48

Checklist

  • Are tests up-to-date with the new changes?
  • Are docs up-to-date with the new changes? (Open PR on docs repo if necessary)

@hopeyen hopeyen self-assigned this Feb 17, 2024
@hopeyen hopeyen added size:medium Medium p2 Medium priority type:feature New or enhanced functionality labels Feb 17, 2024
@hopeyen hopeyen merged commit bcd04dd into dev Feb 19, 2024
2 checks passed
@hopeyen hopeyen deleted the hope/admin-server branch February 19, 2024 13:25
@hopeyen
Copy link
Collaborator Author

hopeyen commented Feb 20, 2024

resolves #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2 Medium priority size:medium Medium type:feature New or enhanced functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant