Skip to content

Commit

Permalink
Updates to ignore prettier formatting of generated file.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-limyr committed Jan 22, 2025
1 parent 0b4f5d5 commit 1cf9024
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions client/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
output/
src/gql/
src/static/query/tripQuery.tsx
2 changes: 1 addition & 1 deletion client/codegen-preprocess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const config: CodegenConfig = {
schema: 'https://otp2debug.dev.entur.org/otp/transmodel/v3/schema.graphql',
documents: 'src/**/*.{ts,tsx}',
generates: {
'src/gql/tripQuery.tsx': {
'src/static/query/tripQuery.tsx': {
plugins: [path.resolve(__dirname, './src/util/generate-queries.cjs')],
},
},
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/SearchBar/GraphiQLRouteButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button } from 'react-bootstrap';
import { TripQueryVariables } from '../../gql/graphql.ts';
import { queryAsString } from '../../gql/tripQuery.tsx';
import { queryAsString } from '../../static/query/tripQuery.tsx';
import graphqlIcon from '../../static/img/graphql-solid.svg';

const graphiQLUrl = import.meta.env.VITE_GRAPHIQL_URL;
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useTripQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from 'react';
import { request } from 'graphql-request';
import { Location, QueryType, TripQueryVariables } from '../gql/graphql.ts';
import { getApiUrl } from '../util/getApiUrl.ts';
import { query } from '../gql/tripQuery.tsx';
import { query } from '../static/query/tripQuery.tsx';

/**
General purpose trip query document for debugging trip searches
Expand Down
2 changes: 1 addition & 1 deletion client/src/util/generate-queries.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const generateQueriesPlugin = async (schema) => {
// Generate the arguments for the query variables with filtered arguments
const argsForQuery = validArgs.map((arg) => ` ${arg.name}: $${arg.name}`).join('\n');

const query = `import { graphql } from '../gql';
const query = `import { graphql } from '../../gql';
import { print } from 'graphql/index';
// Generated trip query based on schema.graphql
Expand Down

0 comments on commit 1cf9024

Please sign in to comment.