Files
smart-city-digital-twin-mar…/smart-app-city/frontend/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js
Eric FELIXINE e30ae8ed09 feat(smart-app): implement complete mobile app MVP
- App.tsx: full navigation (Auth stack + Main tabs with 5 screens)
- Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen
- HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors
- MapScreen: interactive map with layer toggles (6 layers)
- MarketplaceScreen: categories (6), products (5), search
- ChatScreen: AI chat with quick prompts (4), bot responses
- ProfileScreen: user info, stats, menu (9 items), logout
- AlertsScreen: alert list with severity, acknowledge
- SensorsScreen: sensor list with type filters (6 types), search
- ZonesScreen: zone cards with stats
- SettingsScreen: language picker (FR/EN/ES/DE), privacy, about
- Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n
- Hooks: useSensors, useAlerts, useNotifications, useLocation
- Components: Card, Button, LoadingSpinner, ErrorBoundary, Header
- Services: iotService, notificationService (with axios API client)
- Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN)
- Theme: colors.ts with full design system (Blue Ocean palette)
- Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
2026-06-01 18:00:35 -04:00

48 lines
1.5 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.NoUnusedVariablesRule = NoUnusedVariablesRule;
var _GraphQLError = require("../../error/GraphQLError.js");
/**
* No unused variables
*
* A GraphQL operation is only valid if all variables defined by an operation
* are used, either directly or within a spread fragment.
*/
function NoUnusedVariablesRule(context) {
var variableDefs = [];
return {
OperationDefinition: {
enter: function enter() {
variableDefs = [];
},
leave: function leave(operation) {
var variableNameUsed = Object.create(null);
var usages = context.getRecursiveVariableUsages(operation);
for (var _i2 = 0; _i2 < usages.length; _i2++) {
var _ref2 = usages[_i2];
var node = _ref2.node;
variableNameUsed[node.name.value] = true;
}
for (var _i4 = 0, _variableDefs2 = variableDefs; _i4 < _variableDefs2.length; _i4++) {
var variableDef = _variableDefs2[_i4];
var variableName = variableDef.variable.name.value;
if (variableNameUsed[variableName] !== true) {
context.reportError(new _GraphQLError.GraphQLError(operation.name ? "Variable \"$".concat(variableName, "\" is never used in operation \"").concat(operation.name.value, "\".") : "Variable \"$".concat(variableName, "\" is never used."), variableDef));
}
}
}
},
VariableDefinition: function VariableDefinition(def) {
variableDefs.push(def);
}
};
}