-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PWA-1658] Move graphql-cli-validate-magento-pwa-queries to @magento …
…scope (#3198) * Some preliminary work to get introspection working in v4 * Get new cli validation passing following the current eslint rules * Minor cleanup * Remove package from workspaces so it doesn't pollute node_modules with old version * Restore additional graphql validation through linting rules * - Re-add package dependencies that were being hidden by hoisting - Update scaffold template to remove old commands * Test adding additional files to copy command * Back out change that didn't work * Address PR feedback and resolve validation errors with name collisions. * Fix missed @client directive * Remove codegen section until we can resolve name conflicts * Colocate client schemas with components Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>
- Loading branch information
1 parent
cd3cff2
commit adae9d8
Showing
38 changed files
with
2,306 additions
and
1,260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const path = require('path'); | ||
require('dotenv').config({ | ||
path: path.resolve(process.cwd(), 'packages/venia-concept/.env') | ||
}); | ||
|
||
const excludePatterns = | ||
process.env.MAGENTO_BACKEND_EDITION === 'EE' | ||
? ['!**/*.ce.js'] | ||
: ['!**/*.ee.js']; | ||
|
||
const config = { | ||
schema: [ | ||
`${process.env.MAGENTO_BACKEND_URL}/graphql`, | ||
'**/client-schema.graphql' | ||
], | ||
documents: [ | ||
'./packages/{peregrine,venia-ui,venia-concept}/{lib,src}/**/*.{js,graphql,gql}', | ||
...excludePatterns | ||
] | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/extensions/venia-sample-payments-checkmo/client-schema.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extend type StoreConfig { | ||
payment_checkmo_payable_to: String | ||
payment_checkmo_mailing_address: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Apollo specific directives used in the project | ||
directive @client on FIELD | ||
directive @connection(key: String) on FIELD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/peregrine/lib/talons/CartPage/GiftOptions/client-schema.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Mocked client fields used for gift receipt and message components | ||
# TODO: As of 2.4.2 these fields now exist, we should remove these and update components. | ||
extend type Cart { | ||
include_gift_receipt: Boolean! | ||
include_printed_card: Boolean! | ||
local_gift_message: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/peregrine/lib/talons/CartPage/ProductListing/wishlistFragment.ce.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { gql } from '@apollo/client'; | ||
|
||
export const WishlistFragment = gql` | ||
fragment WishlistFragment on Wishlist { | ||
export const WishlistNameFragment = gql` | ||
fragment WishlistNameFragment on Wishlist { | ||
id | ||
} | ||
`; |
4 changes: 2 additions & 2 deletions
4
packages/peregrine/lib/talons/CartPage/ProductListing/wishlistFragment.ee.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/peregrine/lib/talons/CheckoutPage/BillingAddress/client-schema.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Additional client field to persist same billing preference | ||
extend type Cart { | ||
isBillingAddressSame: Boolean! | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/peregrine/lib/talons/CheckoutPage/PaymentInformation/client-schema.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Additional client field needed for storing payment nonce returned by processors | ||
extend type Cart { | ||
paymentNonce: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Additional client field for storing selected currency | ||
extend type Currency { | ||
current_currency_code: String! | ||
} |
Oops, something went wrong.