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

555: Update GraphQL Api #556

Merged
merged 7 commits into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

<!-- Remove some permissions which are unused right now -->
<uses-permission android:name="android.permission.CAMERA" tools:node="remove"/>
<!--<uses-permission android:name="android.permission.CAMERA" tools:node="remove"/>-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove"/>
</manifest>
4 changes: 2 additions & 2 deletions frontend/graphql_queries/regions/get_regions.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query getRegions {
regions {
query getRegions($project: String!) {
regionsInProject(project: $project) {
id,
prefix,
name
Expand Down
4 changes: 2 additions & 2 deletions frontend/graphql_queries/regions/get_regions_by_id.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query getRegionsById($ids: [Int!]!) {
regionsById(params: $ids) {
query getRegionsById($project: String!, $ids: [Int!]!) {
regionsByIdInProject(project: $project, params: $ids) {
id,
prefix,
name
Expand Down
4 changes: 2 additions & 2 deletions frontend/graphql_queries/stores/accepting_store_by_id.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query AcceptingStoreById($ids: [Int!]!) {
physicalStoresById(params: $ids) {
query AcceptingStoreById($project: String!, $ids: [Int!]!) {
physicalStoresByIdInProject(project: $project, ids: $ids) {
id,
coordinates {
lat,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query AcceptingStoreSummaryById($ids: [Int!]!) {
physicalStoresById(params: $ids) {
query AcceptingStoreSummaryById($project: String!, $ids: [Int!]!) {
physicalStoresByIdInProject(project: $project, ids: $ids) {
id,
store {
name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query AcceptingStoresSearch($params: SearchParamsInput!) {
searchAcceptingStores(params: $params) {
query AcceptingStoresSearch($project: String!, $params: SearchParamsInput!) {
searchAcceptingStoresInProject(project: $project, params: $params) {
id
name
description
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
query CardVerificationByHash($card: CardVerificationModelInput!) {
cardValid: verifyCard(card: $card)
query CardVerificationByHash($project: String!, $card: CardVerificationModelInput!) {
cardValid: verifyCardInProject(project: $project, card: $card)
}
3 changes: 3 additions & 0 deletions frontend/lib/configuration/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import 'package:flutter/widgets.dart';
class Configuration extends InheritedWidget {
final String mapStyleUrl;
final String graphqlUrl;
final String projectId;
final bool showVerification;
final bool showDevSettings;

const Configuration({
super.key,
required this.mapStyleUrl,
required this.graphqlUrl,
required this.projectId,
required this.showVerification,
required this.showDevSettings,
required super.child,
Expand All @@ -19,6 +21,7 @@ class Configuration extends InheritedWidget {
bool updateShouldNotify(covariant Configuration oldWidget) =>
mapStyleUrl != oldWidget.mapStyleUrl ||
graphqlUrl != oldWidget.graphqlUrl ||
projectId != oldWidget.projectId ||
showVerification != oldWidget.showVerification ||
showDevSettings != oldWidget.showDevSettings;

Expand Down
Loading