Skip to content

Commit

Permalink
fix: renaming subgraph prefix in Hasura (#1857)
Browse files Browse the repository at this point in the history
* Because our subgraph is named oso_subgraph, it prepended `osoSubgraph`
  to all our model names for namespacing.
* This renames it to just `oso`
  • Loading branch information
ryscheng authored Jul 27, 2024
1 parent 8fdc81b commit b7620a0
Show file tree
Hide file tree
Showing 25 changed files with 325 additions and 373 deletions.
240 changes: 107 additions & 133 deletions apps/hasura3/engine/metadata.json

Large diffs are not rendered by default.

236 changes: 107 additions & 129 deletions apps/hasura3/engine/open_dd.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/hasura3/oso_subgraph/.env.oso_subgraph.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
OSO_SUBGRAPH_OSO_CLICKHOUSE_READ_URL=
OSO_SUBGRAPH_OSO_CLICKHOUSE_WRITE_URL=
OSO__OSO_CLICKHOUSE_READ_URL=
OSO__OSO_CLICKHOUSE_WRITE_URL=
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/ArtifactsByProjectV1.hml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ definition:
- name: projectSource
type: String!
graphql:
typeName: OsoSubgraph_ArtifactsByProjectV1
inputTypeName: OsoSubgraph_ArtifactsByProjectV1Input
typeName: Oso_ArtifactsByProjectV1
inputTypeName: Oso_ArtifactsByProjectV1Input
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: artifacts_by_project_v1
Expand Down Expand Up @@ -113,7 +113,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_ArtifactsByProjectV1BoolExp
typeName: Oso_ArtifactsByProjectV1BoolExp

---
kind: Model
Expand Down Expand Up @@ -155,9 +155,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_artifactsByProjectV1
queryRootField: oso_artifactsByProjectV1
selectUniques: []
orderByExpressionType: OsoSubgraph_ArtifactsByProjectV1OrderBy
orderByExpressionType: Oso_ArtifactsByProjectV1OrderBy

---
kind: ModelPermissions
Expand Down
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/ArtifactsV1.hml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ definition:
- name: artifactUrl
type: String!
graphql:
typeName: OsoSubgraph_ArtifactsV1
inputTypeName: OsoSubgraph_ArtifactsV1Input
typeName: Oso_ArtifactsV1
inputTypeName: Oso_ArtifactsV1Input
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: artifacts_v1
Expand Down Expand Up @@ -86,7 +86,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_ArtifactsV1BoolExp
typeName: Oso_ArtifactsV1BoolExp

---
kind: Model
Expand Down Expand Up @@ -119,9 +119,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_artifactsV1
queryRootField: oso_artifactsV1
selectUniques: []
orderByExpressionType: OsoSubgraph_ArtifactsV1OrderBy
orderByExpressionType: Oso_ArtifactsV1OrderBy

---
kind: ModelPermissions
Expand Down
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/CodeMetricsByProjectV1.hml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ definition:
- name: starCount
type: Int64!
graphql:
typeName: OsoSubgraph_CodeMetricsByProjectV1
inputTypeName: OsoSubgraph_CodeMetricsByProjectV1Input
typeName: Oso_CodeMetricsByProjectV1
inputTypeName: Oso_CodeMetricsByProjectV1Input
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: code_metrics_by_project_v1
Expand Down Expand Up @@ -221,7 +221,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_CodeMetricsByProjectV1BoolExp
typeName: Oso_CodeMetricsByProjectV1BoolExp

---
kind: Model
Expand Down Expand Up @@ -299,9 +299,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_codeMetricsByProjectV1
queryRootField: oso_codeMetricsByProjectV1
selectUniques: []
orderByExpressionType: OsoSubgraph_CodeMetricsByProjectV1OrderBy
orderByExpressionType: Oso_CodeMetricsByProjectV1OrderBy

---
kind: ModelPermissions
Expand Down
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/CollectionsV1.hml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ definition:
- name: displayName
type: String!
graphql:
typeName: OsoSubgraph_CollectionsV1
inputTypeName: OsoSubgraph_CollectionsV1Input
typeName: Oso_CollectionsV1
inputTypeName: Oso_CollectionsV1Input
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: collections_v1
Expand Down Expand Up @@ -86,7 +86,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_CollectionsV1BoolExp
typeName: Oso_CollectionsV1BoolExp

---
kind: Model
Expand Down Expand Up @@ -119,9 +119,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_collectionsV1
queryRootField: oso_collectionsV1
selectUniques: []
orderByExpressionType: OsoSubgraph_CollectionsV1OrderBy
orderByExpressionType: Oso_CollectionsV1OrderBy

---
kind: ModelPermissions
Expand Down
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/ContractsV0.hml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ definition:
- name: rootDeployerAddress
type: String!
graphql:
typeName: OsoSubgraph_ContractsV0
inputTypeName: OsoSubgraph_ContractsV0Input
typeName: Oso_ContractsV0
inputTypeName: Oso_ContractsV0Input
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: contracts_v0
Expand Down Expand Up @@ -59,7 +59,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_ContractsV0BoolExp
typeName: Oso_ContractsV0BoolExp

---
kind: Model
Expand All @@ -83,9 +83,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_contractsV0
queryRootField: oso_contractsV0
selectUniques: []
orderByExpressionType: OsoSubgraph_ContractsV0OrderBy
orderByExpressionType: Oso_ContractsV0OrderBy

---
kind: ModelPermissions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ definition:
- name: projectSource
type: String!
graphql:
typeName: OsoSubgraph_EventIndexingStatusByProjectV1
inputTypeName: OsoSubgraph_EventIndexingStatusByProjectV1Input
typeName: Oso_EventIndexingStatusByProjectV1
inputTypeName: Oso_EventIndexingStatusByProjectV1Input
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: event_indexing_status_by_project_v1
Expand Down Expand Up @@ -113,7 +113,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_EventIndexingStatusByProjectV1BoolExp
typeName: Oso_EventIndexingStatusByProjectV1BoolExp

---
kind: Model
Expand Down Expand Up @@ -155,9 +155,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_eventIndexingStatusByProjectV1
queryRootField: oso_eventIndexingStatusByProjectV1
selectUniques: []
orderByExpressionType: OsoSubgraph_EventIndexingStatusByProjectV1OrderBy
orderByExpressionType: Oso_EventIndexingStatusByProjectV1OrderBy

---
kind: ModelPermissions
Expand Down
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/EventTypesV1.hml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ definition:
- name: eventType
type: String!
graphql:
typeName: OsoSubgraph_EventTypesV1
inputTypeName: OsoSubgraph_EventTypesV1Input
typeName: Oso_EventTypesV1
inputTypeName: Oso_EventTypesV1Input
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: event_types_v1
Expand Down Expand Up @@ -41,7 +41,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_EventTypesV1BoolExp
typeName: Oso_EventTypesV1BoolExp

---
kind: Model
Expand All @@ -59,9 +59,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_eventTypesV1
queryRootField: oso_eventTypesV1
selectUniques: []
orderByExpressionType: OsoSubgraph_EventTypesV1OrderBy
orderByExpressionType: Oso_EventTypesV1OrderBy

---
kind: ModelPermissions
Expand Down
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/EventsDailyToArtifact.hml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ definition:
- name: eventType
type: String!
graphql:
typeName: OsoSubgraph_EventsDailyToArtifact
inputTypeName: OsoSubgraph_EventsDailyToArtifactInput
typeName: Oso_EventsDailyToArtifact
inputTypeName: Oso_EventsDailyToArtifactInput
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: events_daily_to_artifact
Expand Down Expand Up @@ -68,7 +68,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_EventsDailyToArtifactBoolExp
typeName: Oso_EventsDailyToArtifactBoolExp

---
kind: Model
Expand All @@ -95,9 +95,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_eventsDailyToArtifact
queryRootField: oso_eventsDailyToArtifact
selectUniques: []
orderByExpressionType: OsoSubgraph_EventsDailyToArtifactOrderBy
orderByExpressionType: Oso_EventsDailyToArtifactOrderBy

---
kind: ModelPermissions
Expand Down
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/EventsDailyToCollection.hml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ definition:
- name: eventType
type: String!
graphql:
typeName: OsoSubgraph_EventsDailyToCollection
inputTypeName: OsoSubgraph_EventsDailyToCollectionInput
typeName: Oso_EventsDailyToCollection
inputTypeName: Oso_EventsDailyToCollectionInput
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: events_daily_to_collection
Expand Down Expand Up @@ -68,7 +68,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_EventsDailyToCollectionBoolExp
typeName: Oso_EventsDailyToCollectionBoolExp

---
kind: Model
Expand All @@ -95,9 +95,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_eventsDailyToCollection
queryRootField: oso_eventsDailyToCollection
selectUniques: []
orderByExpressionType: OsoSubgraph_EventsDailyToCollectionOrderBy
orderByExpressionType: Oso_EventsDailyToCollectionOrderBy

---
kind: ModelPermissions
Expand Down
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/EventsDailyToProject.hml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ definition:
- name: projectId
type: String!
graphql:
typeName: OsoSubgraph_EventsDailyToProject
inputTypeName: OsoSubgraph_EventsDailyToProjectInput
typeName: Oso_EventsDailyToProject
inputTypeName: Oso_EventsDailyToProjectInput
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: events_daily_to_project
Expand Down Expand Up @@ -68,7 +68,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_EventsDailyToProjectBoolExp
typeName: Oso_EventsDailyToProjectBoolExp

---
kind: Model
Expand All @@ -95,9 +95,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_eventsDailyToProject
queryRootField: oso_eventsDailyToProject
selectUniques: []
orderByExpressionType: OsoSubgraph_EventsDailyToProjectOrderBy
orderByExpressionType: Oso_EventsDailyToProjectOrderBy

---
kind: ModelPermissions
Expand Down
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/EventsMonthlyToArtifact.hml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ definition:
- name: eventType
type: String!
graphql:
typeName: OsoSubgraph_EventsMonthlyToArtifact
inputTypeName: OsoSubgraph_EventsMonthlyToArtifactInput
typeName: Oso_EventsMonthlyToArtifact
inputTypeName: Oso_EventsMonthlyToArtifactInput
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: events_monthly_to_artifact
Expand Down Expand Up @@ -68,7 +68,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_EventsMonthlyToArtifactBoolExp
typeName: Oso_EventsMonthlyToArtifactBoolExp

---
kind: Model
Expand All @@ -95,9 +95,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_eventsMonthlyToArtifact
queryRootField: oso_eventsMonthlyToArtifact
selectUniques: []
orderByExpressionType: OsoSubgraph_EventsMonthlyToArtifactOrderBy
orderByExpressionType: Oso_EventsMonthlyToArtifactOrderBy

---
kind: ModelPermissions
Expand Down
10 changes: 5 additions & 5 deletions apps/hasura3/oso_subgraph/metadata/EventsMonthlyToCollection.hml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ definition:
- name: eventType
type: String!
graphql:
typeName: OsoSubgraph_EventsMonthlyToCollection
inputTypeName: OsoSubgraph_EventsMonthlyToCollectionInput
typeName: Oso_EventsMonthlyToCollection
inputTypeName: Oso_EventsMonthlyToCollectionInput
dataConnectorTypeMapping:
- dataConnectorName: oso_clickhouse
dataConnectorObjectType: events_monthly_to_collection
Expand Down Expand Up @@ -68,7 +68,7 @@ definition:
operators:
enableAll: true
graphql:
typeName: OsoSubgraph_EventsMonthlyToCollectionBoolExp
typeName: Oso_EventsMonthlyToCollectionBoolExp

---
kind: Model
Expand All @@ -95,9 +95,9 @@ definition:
enableAll: true
graphql:
selectMany:
queryRootField: osoSubgraph_eventsMonthlyToCollection
queryRootField: oso_eventsMonthlyToCollection
selectUniques: []
orderByExpressionType: OsoSubgraph_EventsMonthlyToCollectionOrderBy
orderByExpressionType: Oso_EventsMonthlyToCollectionOrderBy

---
kind: ModelPermissions
Expand Down
Loading

0 comments on commit b7620a0

Please sign in to comment.