-
Notifications
You must be signed in to change notification settings - Fork 79
CIF-1996: Add copyright headers to CSS and graphql files #518
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #518 +/- ##
=========================================
Coverage 87.59% 87.59%
Complexity 1232 1232
=========================================
Files 232 232
Lines 5875 5875
Branches 857 857
=========================================
Hits 5146 5146
Misses 574 574
Partials 155 155
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
|
I remember we had some tooling that collected the queries made by the React components (@herzog31 knows more). I think this tooling wouldn't work with the change you did to the |
cjelger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to @dplaton's comment, this will break https://github.com/adobe/commerce-cif-graphql-integration-reference/blob/master/src/documentation/generate.js#L69-L73 but it would also be simple to fix it there.
| let schema = buildClientSchema(magentoSchema.data); | ||
|
|
||
| it.each(files)('validates the GraphQL request from %s', file => { | ||
| let query = fs.readFileSync(path.join(__dirname, '..', file), 'UTF-8'); // eslint-disable-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should rather simply dynamically import each query/file here as any normal exported js module value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried that. didn't work for some reason.
Got some can't access length property of undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there seems to be a difference between the parsed query and the imported one:
parsed query:
{
kind: 'Document',
definitions: [
{
kind: 'OperationDefinition',
operation: 'query',
name: [Object],
variableDefinitions: [],
directives: [],
selectionSet: [Object],
loc: [Object]
}
],
loc: { start: 0, end: 146 }
}
imported query :
{
default: {
kind: 'Document',
definitions: [ [Object] ],
loc: { start: 0, end: 147 }
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore my comments. I'll update the code.
|
@dplaton, @cjelger I opened a PR for the tool you mentioned |
|
Did anyone ask for an exception? Changing all the graphql files including the webpack build and tests, just for the sake of adding copyright headers is ridiculous. Can't we simply put a license file in the folder where all queries are and say that it applies to all? I'm fine with the changes to the css files. |
Description
Added copyright headers to CSS and graphql files
Related Issue
CIF-1996
Motivation and Context
According to a comment on a completely different issue on OSS Advisory Board we should have copyright headers on CSS and GraphQL files as well.
How Has This Been Tested?
Unit tests
Manually
Screenshots (if appropriate):
Types of changes
Checklist: