Skip to content

Commit

Permalink
Bump tower-http,axum (#146)
Browse files Browse the repository at this point in the history
* Bump tower-http,axum
* remove example
* Remove example from CI

Co-authored-by: Brandon Kite <brandonkite92@gmail.com>
  • Loading branch information
rakita and Voxelot authored Jan 21, 2022
1 parent 9b0b744 commit 2baeae6
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 189 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,6 @@ jobs:
command: test
args: --verbose --all-targets

- name: Check formatting (examples)
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path examples/Cargo.toml --all --verbose -- --check

- name: Check build (examples)
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path examples/Cargo.toml --verbose --all-targets

- name: Check Clippy Lints (examples)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path examples/Cargo.toml --verbose --all-targets

- name: Run tests (examples)
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path examples/Cargo.toml --verbose --all-targets

publish:
# Only do this job if publishing a release
needs: build
Expand Down
45 changes: 39 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/.gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions examples/Cargo.toml

This file was deleted.

2 changes: 0 additions & 2 deletions examples/simple-wasm/.cargo/config

This file was deleted.

15 changes: 0 additions & 15 deletions examples/simple-wasm/Cargo.toml

This file was deleted.

11 changes: 0 additions & 11 deletions examples/simple-wasm/README.md

This file was deleted.

41 changes: 0 additions & 41 deletions examples/simple-wasm/contracts/my_struct.json

This file was deleted.

14 changes: 0 additions & 14 deletions examples/simple-wasm/manifest.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions examples/simple-wasm/schema/schema.graphql

This file was deleted.

33 changes: 0 additions & 33 deletions examples/simple-wasm/src/lib.rs

This file was deleted.

5 changes: 3 additions & 2 deletions fuel-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ test = false

[dependencies]
async-graphql = { version = "=2.9", features = ["chrono", "chrono-tz"] }
axum = { version = "0.2" }
async-trait = "0.1"
axum = { version = "0.4.4" }
bincode = "1.3"
chrono = { version = "0.4", features = ["serde"] }
derive_more = { version = "0.99" }
Expand All @@ -46,7 +47,7 @@ strum = "0.21"
strum_macros = "0.21"
thiserror = "1.0.26"
tokio = { version = "1.8", features = ["macros", "rt-multi-thread"] }
tower-http = { version = "0.1", features = ["set-header"] }
tower-http = { version = "0.2.1", features = ["set-header"] }
tower-layer = "0.3"
tracing = "0.1"
tracing-subscriber = { version = "0.2", features = ["env-filter"] }
Expand Down
12 changes: 5 additions & 7 deletions fuel-core/src/service/graph_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ use crate::schema::{build_schema, dap, CoreSchema};
use crate::service::Config;
use crate::tx_pool::TxPool;
use async_graphql::{http::playground_source, http::GraphQLPlaygroundConfig, Request, Response};
use axum::routing::{get, post};
use axum::{
body::Body,
extract::Extension,
handler::{get, post},
http::{
header::{
ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN,
Expand Down Expand Up @@ -40,19 +39,18 @@ pub async fn start_server(
.route("/graphql", post(graphql_handler).options(ok))
.route("/health", get(health))
.layer(AddExtensionLayer::new(schema))
.layer(SetResponseHeaderLayer::<_, Body>::overriding(
.layer(SetResponseHeaderLayer::<_>::overriding(
ACCESS_CONTROL_ALLOW_ORIGIN,
HeaderValue::from_static("*"),
))
.layer(SetResponseHeaderLayer::<_, Body>::overriding(
.layer(SetResponseHeaderLayer::<_>::overriding(
ACCESS_CONTROL_ALLOW_METHODS,
HeaderValue::from_static("*"),
))
.layer(SetResponseHeaderLayer::<_, Body>::overriding(
.layer(SetResponseHeaderLayer::<_>::overriding(
ACCESS_CONTROL_ALLOW_HEADERS,
HeaderValue::from_static("*"),
))
.boxed();
));

let (tx, rx) = tokio::sync::oneshot::channel();
let listener = TcpListener::bind(&config.addr)?;
Expand Down
2 changes: 1 addition & 1 deletion fuel-indexer/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ quote = "1.0"
syn = { version = "1.0", features = ["full"] }

[dev-dependencies]
fuels-core = { version = "0.1" }
fuel-indexer = { path = "../lib" }
fuels-core = { version = "0.1" }
serde = { version = "1.0", default-features = false, features = ["derive"] }
trybuild = "1.0"
2 changes: 1 addition & 1 deletion fuel-indexer/indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ wasmer-engine-universal = "2.0"
[dev-dependencies]
fuel-indexer = { path = "../lib" }
fuel-tx = { version = "0.2", features = ["serde-types"] }
fuels-core = { version = "0.1" }
fuel-types = { version = "0.1", features = ["serde-types"] }
fuels-core = { version = "0.1" }
serde_yaml = "0.8.19"

[features]
Expand Down

0 comments on commit 2baeae6

Please sign in to comment.