Skip to content

Commit

Permalink
fix schema bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hazelnutcloud committed Apr 7, 2023
1 parent a325e5a commit 0fed84f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# v0.3.7
- fix: Fixed a bug where arkive would crash if you used event wildcards
- fix: Fixed a bug where entities from other arkvies would show up in other arkives graphql schema
- fix: Fixed a bug where reading source.options would return undefined
- feat: Updated init template to show clearer example
- feat: Added `--no-db` flag to `arkiver start` command to disable connecting to
MongoDB and serving data via GraphQL
Expand Down
2 changes: 1 addition & 1 deletion src/arkiver/arkiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class Arkiver extends EventTarget {
const dataSource = new DataSource({
arkiveId: this.arkiveData.id,
arkiveVersion: this.arkiveData.deployment.major_version,
blockRange: source.options.blockRange,
blockRange: source.options?.blockRange ?? 100n,
chain,
contracts: source.contracts ?? [],
rpcUrl: rpcUrl,
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export const buildSchemaFromEntities = (
// deno-lint-ignore no-explicit-any
entities: { model: mongoose.Model<any>; list: boolean }[],
) => {
schemaComposer.clear();
for (const { model, list } of entities) {
schemaComposer.delete(model.modelName);
// deno-lint-ignore no-explicit-any
const ModelTC = composeMongoose<any>(model);

Expand Down

1 comment on commit 0fed84f

@vercel
Copy link

@vercel vercel bot commented on 0fed84f Apr 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.